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

Commitd7acf6c

Browse files
committed
Fix pg_dump support for security labels on columns.
Along the way, correct an erroneous comment.
1 parent6a208aa commitd7acf6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/bin/pg_dump/pg_dump.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10730,7 +10730,7 @@ dumpTableSecLabel(Archive *fout, TableInfo *tbinfo, const char *reltypename)
1073010730
tbinfo->dobj.catId.oid,
1073110731
&labels);
1073210732

10733-
/* Ifcomments exist, build SECURITY LABEL statements */
10733+
/* Ifsecurity labels exist, build SECURITY LABEL statements */
1073410734
if (nlabels <=0)
1073510735
return;
1073610736

@@ -10753,9 +10753,9 @@ dumpTableSecLabel(Archive *fout, TableInfo *tbinfo, const char *reltypename)
1075310753
else
1075410754
{
1075510755
colname=getAttrName(objsubid,tbinfo);
10756-
appendPQExpBuffer(target,"COLUMN %s.%s",
10757-
fmtId(tbinfo->dobj.name),
10758-
fmtId(colname));
10756+
/* first fmtId result must be consumed before calling it again */
10757+
appendPQExpBuffer(target,"COLUMN %s",fmtId(tbinfo->dobj.name));
10758+
appendPQExpBuffer(target,".%s",fmtId(colname));
1075910759
}
1076010760
appendPQExpBuffer(query,"SECURITY LABEL FOR %s ON %s IS ",
1076110761
fmtId(provider),target->data);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp