Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
pg_dump: Fix quoting of domain constraint names
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 22 Jan 2016 23:04:35 +0000 (20:04 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 22 Jan 2016 23:04:35 +0000 (20:04 -0300)
The original code was adding double quotes to an already-quoted
identifier, leading to nonsensical results.  Remove the quoting call.

I introduced the broken code in 7eca575d1c of 9.5 era, so backpatch to
9.5.

Report and patch by Elvis Pranskevichus
Reviewed by Michael Paquier

src/bin/pg_dump/pg_dump.c

index 020a982712cdb9d64ffcb38329c787cbe18669ce..c58ce6aff3a9e8f6edbf1278461d22cc63b362a0 100644 (file)
@@ -9592,7 +9592,7 @@ dumpDomain(Archive *fout, TypeInfo *tyinfo)
        appendPQExpBuffer(labelq, "CONSTRAINT %s ",
                          fmtId(domcheck->dobj.name));
        appendPQExpBuffer(labelq, "ON DOMAIN %s",
-                         fmtId(qtypname));
+                         qtypname);
        dumpComment(fout, labelq->data,
                    tyinfo->dobj.namespace->dobj.name,
                    tyinfo->rolname,