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

Commit7b158d1

Browse files
committed
Suppress extensions in partial dumps.
We initially had pg_dump emit CREATE EXTENSION commands unconditionally.However, pg_dump has long been in the habit of not dumping procedurallanguage definitions when a --schema or --table switch is given. It seemsappropriate to handle extensions the same way, since like PLs they are SQLobjects that are not in any particular schema. Per complaint from AdrianSchreyer.
1 parent3439e40 commit7b158d1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,18 +1153,19 @@ selectDumpableDefaultACL(DefaultACLInfo *dinfo)
11531153
* selectDumpableExtension: policy-setting subroutine
11541154
*Mark an extension as to be dumped or not
11551155
*
1156-
* Normally, we just dump all extensions. However, in binary-upgrade mode
1157-
* it's necessary to skip built-in extensions, since we assume those will
1158-
* already be installed in the target database. We identify such extensions
1159-
* by their having OIDs in the range reserved for initdb.
1156+
* Normally, we dump all extensions, or none of them if include_everything
1157+
* is false (i.e., a --schema or --table switch was given). However, in
1158+
* binary-upgrade mode it's necessary to skip built-in extensions, since we
1159+
* assume those will already be installed in the target database. We identify
1160+
* such extensions by their having OIDs in the range reserved for initdb.
11601161
*/
11611162
staticvoid
11621163
selectDumpableExtension(ExtensionInfo*extinfo)
11631164
{
11641165
if (binary_upgrade&&extinfo->dobj.catId.oid< (Oid)FirstNormalObjectId)
11651166
extinfo->dobj.dump= false;
11661167
else
1167-
extinfo->dobj.dump=true;
1168+
extinfo->dobj.dump=include_everything;
11681169
}
11691170

11701171
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp