Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fecf30

Browse files
committed
Seems my check constraint change did break stuff.
Alias the appropriate columns back to their original name.Fixed formatting of a few other places as I went along (indenting)--Rod Taylor <rbt@rbt.ca>
1 parent187e865 commit9fecf30

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*by PostgreSQL
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.336 2003/07/23 08:47:30 petere Exp $
15+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.337 2003/07/25 19:37:21 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -3304,13 +3304,13 @@ dumpOneDomain(Archive *fout, TypeInfo *tinfo)
33043304
* Fetch and process CHECK constraints for the domain
33053305
*/
33063306
if (g_fout->remoteVersion >=70400)
3307-
appendPQExpBuffer(chkquery,"SELECT conname,"
3307+
appendPQExpBuffer(chkquery,"SELECT conname,"
33083308
"pg_catalog.pg_get_constraintdef(oid) AS consrc "
33093309
"FROM pg_catalog.pg_constraint "
33103310
"WHERE contypid = '%s'::pg_catalog.oid",
33113311
tinfo->oid);
33123312
else
3313-
appendPQExpBuffer(chkquery,"SELECT conname, 'CHECK (' || consrc || ')'"
3313+
appendPQExpBuffer(chkquery,"SELECT conname, 'CHECK (' || consrc || ')' AS consrc"
33143314
"FROM pg_catalog.pg_constraint "
33153315
"WHERE contypid = '%s'::pg_catalog.oid",
33163316
tinfo->oid);
@@ -5267,8 +5267,8 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
52675267
if (g_fout->remoteVersion >=70400)
52685268
appendPQExpBuffer(query,"SELECT conname, "
52695269
" pg_catalog.pg_get_constraintdef(c1.oid) AS consrc "
5270-
" from pg_catalog.pg_constraint c1"
5271-
" where conrelid = '%s'::pg_catalog.oid "
5270+
" from pg_catalog.pg_constraint c1"
5271+
" where conrelid = '%s'::pg_catalog.oid "
52725272
" and contype = 'c' "
52735273
" and not exists "
52745274
" (select 1 from "
@@ -5286,7 +5286,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
52865286
tbinfo->oid);
52875287
elseif (g_fout->remoteVersion >=70300)
52885288
appendPQExpBuffer(query,"SELECT conname, "
5289-
" 'CHECK (' || consrc || ')'"
5289+
" 'CHECK (' || consrc || ')' AS consrc"
52905290
" from pg_catalog.pg_constraint c1"
52915291
" where conrelid = '%s'::pg_catalog.oid "
52925292
" and contype = 'c' "
@@ -6063,7 +6063,7 @@ dumpConstraints(Archive *fout, TableInfo *tblinfo, int numTables)
60636063
resetPQExpBuffer(query);
60646064
appendPQExpBuffer(query,
60656065
"SELECT oid, conname, "
6066-
"pg_catalog.pg_get_constraintdef(oid) as condef "
6066+
"pg_catalog.pg_get_constraintdef(oid) as condef "
60676067
"FROM pg_catalog.pg_constraint "
60686068
"WHERE conrelid = '%s'::pg_catalog.oid "
60696069
"AND contype = 'f'",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp