mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Fix pg_dump support for security labels on columns.
Along the way, correct an erroneous comment.
This commit is contained in:
@ -10730,7 +10730,7 @@ dumpTableSecLabel(Archive *fout, TableInfo *tbinfo, const char *reltypename)
|
|||||||
tbinfo->dobj.catId.oid,
|
tbinfo->dobj.catId.oid,
|
||||||
&labels);
|
&labels);
|
||||||
|
|
||||||
/* If comments exist, build SECURITY LABEL statements */
|
/* If security labels exist, build SECURITY LABEL statements */
|
||||||
if (nlabels <= 0)
|
if (nlabels <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -10753,9 +10753,9 @@ dumpTableSecLabel(Archive *fout, TableInfo *tbinfo, const char *reltypename)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
colname = getAttrName(objsubid, tbinfo);
|
colname = getAttrName(objsubid, tbinfo);
|
||||||
appendPQExpBuffer(target, "COLUMN %s.%s",
|
/* first fmtId result must be consumed before calling it again */
|
||||||
fmtId(tbinfo->dobj.name),
|
appendPQExpBuffer(target, "COLUMN %s", fmtId(tbinfo->dobj.name));
|
||||||
fmtId(colname));
|
appendPQExpBuffer(target, ".%s", fmtId(colname));
|
||||||
}
|
}
|
||||||
appendPQExpBuffer(query, "SECURITY LABEL FOR %s ON %s IS ",
|
appendPQExpBuffer(query, "SECURITY LABEL FOR %s ON %s IS ",
|
||||||
fmtId(provider), target->data);
|
fmtId(provider), target->data);
|
||||||
|
Reference in New Issue
Block a user