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

Commit0484175

Browse files
committed
Fix pg_get_constraintdef to cope with NOT VALID constraints
This case was missed when NOT VALID constraints were first introduced incommit722bf70 by Simon Riggs on2011-02-08. Among other things, it causes pg_dump to omit the NOT VALIDflag when dumping such constraints, which may cause them to fail toload afterwards, if they contained values failing the constraint.Per report from Thom Brown.
1 parentea8e42f commit0484175

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,9 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand,
13731373
if (conForm->condeferred)
13741374
appendStringInfo(&buf," INITIALLY DEFERRED");
13751375

1376+
if (!conForm->convalidated)
1377+
appendStringInfoString(&buf," NOT VALID");
1378+
13761379
/* Cleanup */
13771380
ReleaseSysCache(tup);
13781381

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp