aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-06-25 04:09:15 +0000
committerBruce Momjian <bruce@momjian.us>2003-06-25 04:09:15 +0000
commit612cbaf5ed7e4a50b45eb7efd4bae7302918eb24 (patch)
tree0b76e30723fd8bfab78020b0973355d283b2ced7 /src
parent5fbc1d4a452bf06bc4b8701e5a3f0bc7dfcac004 (diff)
downloadpostgresql-612cbaf5ed7e4a50b45eb7efd4bae7302918eb24.tar.gz
postgresql-612cbaf5ed7e4a50b45eb7efd4bae7302918eb24.zip
[ Backpatch to 7.3.X.]
If they're not, the below causes problems, as the foreign key is added after the CHECK. Cluster depends on the index name, so I thought it wise to ensure all names are available, rather than leaving off the CONSTRAINT "$n" portion for internally named constraints. CREATE TABLE jkey (col integer primary key); CREATE TABLE j (col integer REFERENCES jkey); ALTER TABLE j ADD CHECK(col > 5); This is a problem in 7.3 series as well as -Tip. -- Rod Taylor <rbt@rbt.ca>
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_dump.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 831c22b419b..858faecc181 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.305.2.6 2003/05/16 13:57:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.305.2.7 2003/06/25 04:09:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -5388,8 +5388,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
if (actual_atts + j > 0)
appendPQExpBuffer(q, ",\n ");
- if (name[0] != '$')
- appendPQExpBuffer(q, "CONSTRAINT %s ",
+ appendPQExpBuffer(q, "CONSTRAINT %s ",
fmtId(name));
appendPQExpBuffer(q, "CHECK (%s)", expr);
}