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

Commitd31b20a

Browse files
committed
Fix dumping of DEFERRABLE/INITIALLY DEFERRED:
> The big problem is that while pg_dump's dump_trigger() looks at> tginitdeferred and dumps accordingly, pg_get_constraintdef doesn't look> at tginitdeferred, and therefore doesn't record the requirement as part> of ALTER TABLE ADD CONSTRAINT.pg_get_constraintdef should probably be looking at condeferrable andcondeferred in the pg_constraint row it's looking at. Maybe somethinglike the attached.(Added, output only non-default values.)Stephan Szabo
1 parent5e36cbe commitd31b20a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*back to source text
44
*
55
* IDENTIFICATION
6-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.129 2002/12/14 00:17:59 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.130 2003/01/08 22:54:06 momjian Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -688,6 +688,11 @@ pg_get_constraintdef(PG_FUNCTION_ARGS)
688688
}
689689
appendStringInfo(&buf," ON DELETE %s",string);
690690

691+
if (conForm->condeferrable)
692+
appendStringInfo(&buf," DEFERRABLE");
693+
if (conForm->condeferred)
694+
appendStringInfo(&buf," INITIALLY DEFERRED");
695+
691696
break;
692697
}
693698

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp