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

Commit59de132

Browse files
committed
Fix oversight in pg_dump's handling of extension configuration tables.
If an extension has not been selected to be dumped (perhaps because ofa --schema or --table switch), the contents of its configuration tablessurely should not get dumped either. Per gripe fromHubert Depesz Lubaczewski.
1 parent97dc3c8 commit59de132

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14179,13 +14179,18 @@ getExtensionMembership(Archive *fout, ExtensionInfo extinfo[],
1417914179
*/
1418014180
for (i=0;i<numExtensions;i++)
1418114181
{
14182-
char*extconfig=extinfo[i].extconfig;
14183-
char*extcondition=extinfo[i].extcondition;
14182+
ExtensionInfo*curext=&(extinfo[i]);
14183+
char*extconfig=curext->extconfig;
14184+
char*extcondition=curext->extcondition;
1418414185
char**extconfigarray=NULL;
1418514186
char**extconditionarray=NULL;
1418614187
intnconfigitems;
1418714188
intnconditionitems;
1418814189

14190+
/* Tables of not-to-be-dumped extensions shouldn't be dumped */
14191+
if (!curext->dobj.dump)
14192+
continue;
14193+
1418914194
if (parsePGArray(extconfig,&extconfigarray,&nconfigitems)&&
1419014195
parsePGArray(extcondition,&extconditionarray,&nconditionitems)&&
1419114196
nconfigitems==nconditionitems)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp