8000 Minor improvements in sequence decoding code and docs · postgres/postgres@05843b1 · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9","url":"/postgres/postgres/commit/05843b1aa49df2ecc9b97c693b755bd1b6f856a9","authoredDate":"2022-03-25T20:12:50.000+01:00","committedDate":"2022-03-25T21:07:17.000+01:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eMinor improvements in sequence decoding code and docs\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"A couple minor comment improvements and code cleanups, based on\npost-commit feedback to the sequence decoding patch.\n\nAuthor: Amit Kapila, vignesh C\nDiscussion: \u003ca href=\"https://postgr.es/m/aeb2ba8d-e6f4-5486-cc4c-0d4982c291cb@enterprisedb.com\" rel=\"nofollow\"\u003ehttps://postgr.es/m/aeb2ba8d-e6f4-5486-cc4c-0d4982c291cb@enterprisedb.com\u003c/a\u003e","authors":[{"login":"tvondra","displayName":"Tomas Vondra","avatarUrl":"https://avatars.githubusercontent.com/u/539575?v=4","path":"/tvondra","isGitHub":false}],"committerAttribution":false,"committer":{"login":"tvondra","displayName":"Tomas Vondra","avatarUrl":"https://avatars.githubusercontent.com/u/539575?v=4","path":"/tvondra","isGitHub":false},"parents":["174877f1e344812f620fd8891af97104d5dfca13"],"globalRelayId":"C_kwDOAA4m0toAKDA1ODQzYjFhYTQ5ZGYyZWNjOWI5N2M2OTNiNzU1YmQxYjZmODU2YTk","sha1":"174877f1e344812f620fd8891af97104d5dfca13","sha2":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":7140,"text":"@@ -7141,7 +7141,7 @@ Sequence","html":"@@ -7141,7 +7141,7 @@ Sequence","displayNoNewLineWarning":false,"position":0,"left":7140,"right":7140},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7141,"text":" \u003c/term\u003e","html":" \u0026lt;/term\u0026gt;","displayNoNewLineWarning":false,"position":1,"left":7141,"right":7141},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7142,"text":" \u003clistitem\u003e","html":" \u0026lt;listitem\u0026gt;","displayNoNewLineWarning":false,"position":2,"left":7142,"right":7142},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7143,"text":" \u003cpara\u003e","html":" \u0026lt;para\u0026gt;","displayNoNewLineWarning":false,"position":3,"left":7143,"right":7143},{"stylingDirective":null,"type":"DELETION","blobLineNumber":7144,"text":"- 1 if the sequence update is transactions, 0 otherwise.","html":"- 1 if the sequence update is \u003cspan class=\"x x-first x-last\"\u003etransactions\u003c/span\u003e, 0 otherwise.","displayNoNewLineWarning":false,"position":4,"left":7144,"right":7143},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":7144,"text":"+ 1 if the sequence update is transactional, 0 otherwise.","html":"+ 1 if the sequence update is \u003cspan class=\"x x-first x-last\"\u003etransactional\u003c/span\u003e, 0 otherwise.","displayNoNewLineWarning":false,"position":5,"left":7144,"right":7144},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7145,"text":" \u003c/para\u003e","html":" \u0026lt;/para\u0026gt;","displayNoNewLineWarning":false,"position":6,"left":7145,"right":7145},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7146,"text":" \u003c/listitem\u003e","html":" \u0026lt;/listitem\u0026gt;","displayNoNewLineWarning":false,"position":7,"left":7146,"right":7146},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":7147,"text":" \u003c/varlistentry\u003e","html":" \u0026lt;/varlistentry\u0026gt;","displayNoNewLineWarning":false,"position":8,"left":7147,"right":7147}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":8387,"linesChanged":2,"newTreeEntry":{"lineCount":8387,"path":"doc/src/sgml/protocol.sgml","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"doc/src/sgml/protocol.sgml","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"doc/src/sgml/protocol.sgml","pathDigest":"331c33fd11c3ed85f9dbfead93f139c20ff3a25176651fc2ed37c486b97630e6","status":"MODIFIED","truncatedReason":null,"oldOid":"174877f1e344812f620fd8891af97104d5dfca13","newOid":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9","copilotChatReference":null,"deletedSha":"174877f1e344812f620fd8891af97104d5dfca13","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":192,"text":"@@ -193,7 +193,7 @@ AssertObjectTypeValid(char objectType)","html":"@@ -193,7 +193,7 @@ AssertObjectTypeValid(char objectType)","displayNoNewLineWarning":false,"position":0,"left":192,"right":192},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":193,"text":" }","html":" }","displayNoNewLineWarning":false,"position":1,"left":193,"right":193},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":194,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":194,"right":194},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":195,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":195,"right":195},{"stylingDirective":null,"type":"DELETION","blobLineNumber":196,"text":"- * Determine object type given the object type set for a schema.","html":"-\u003cspan class=\"pl-c\"\u003e * Determine object type \u003cspan class=\"x x-first x-last\"\u003egiven the object type set for a schema\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":196,"right":195},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":196,"text":"+ * Determine object type matching a given a relkind value.","html":"+\u003cspan class=\"pl-c\"\u003e * Determine object type \u003cspan class=\"x x-first x-last\"\u003ematching a given a relkind value\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":196,"right":196},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":197,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":197,"right":197},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":198,"text":" char","html":" \u003cspan class=pl-smi\u003echar\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":198,"right":198},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":199,"text":" pub_get_object_type_for_relkind(char relkind)","html":" \u003cspan class=pl-en\u003epub_get_object_type_for_relkind\u003c/span\u003e(\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003erelkind\u003c/span\u003e)","displayNoNewLineWarning":false,"position":8,"left":199,"right":199}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1277,"linesChanged":2,"newTreeEntry":{"lineCount":1277,"path":"src/backend/catalog/pg_publication.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/catalog/pg_publication.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/catalog/pg_publication.c","pathDigest":"1ecc273c7808aba21749ea2718482c153cd6c4dc9d90c69124f3a7c5963b2b4a","status":"MODIFIED","truncatedReason":null,"oldOid":"174877f1e344812f620fd8891af97104d5dfca13","newOid":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9","copilotChatReference":null,"deletedSha":"174877f1e344812f620fd8891af97104d5dfca13","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":174,"text":"@@ -175,8 +175,7 @@ parse_publication_options(ParseState *pstate,","html":"@@ -175,8 +175,7 @@ parse_publication_options(ParseState *pstate,","displayNoNewLineWarning":false,"position":0,"left":174,"right":174},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":175,"text":" static void","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":175,"right":175},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":176,"text":" ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","html":" \u003cspan class=pl-en\u003eObjectsInPublicationToOids\u003c/span\u003e(\u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epubobjspec_list\u003c/span\u003e, \u003cspan class=pl-smi\u003eParseState\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":176,"right":176},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":177,"text":" \t\t\t\t\t\t List **tables, List **sequences,","html":" \t\t\t\t\t\t \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables\u003c/span\u003e, \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":177,"right":177},{"stylingDirective":null,"type":"DELETION","blobLineNumber":178,"text":"-\t\t\t\t\t\t List **tables_schemas, List **sequences_schemas,","html":"-\t\t\t\t\t\t \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e, \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e,","displayNoNewLineWarning":false,"position":4,"left":178,"right":177},{"stylingDirective":null,"type":"DELETION","blobLineNumber":179,"text":"-\t\t\t\t\t\t List **schemas)","html":"-\t\t\t\t\t\t \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e)","displayNoNewLineWarning":false,"position":5,"left":179,"right":177},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":178,"text":"+\t\t\t\t\t\t List **tables_schemas, List **sequences_schemas)","html":"+\t\t\t\t\t\t \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e, \u003cspan class=pl-smi\u003eList\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e)","displayNoNewLineWarning":false,"position":6,"left":179,"right":178},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":179,"text":" {","html":" {","displayNoNewLineWarning":false,"position":7,"left":180,"right":179},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":180,"text":" \tListCell *cell;","html":" \t\u003cspan class=pl-smi\u003eListCell\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecell\u003c/span\u003e;","displayNoNewLineWarning":false,"position":8,"left":181,"right":180},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":181,"text":" \tPublicationObjSpec *pubobj;","html":" \t\u003cspan class=pl-smi\u003ePublicationObjSpec\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epubobj\u003c/span\u003e;","displayNoNewLineWarning":false,"position":9,"left":182,"right":181},{"stylingDirective":null,"type":"HUNK","blobLineNumber":202,"text":"@@ -204,14 +203,12 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","html":"@@ -204,14 +203,12 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","displayNoNewLineWarning":false,"position":10,"left":203,"right":202},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":203,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":11,"left":204,"right":203},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":204,"text":" \t\t\t\t/* Filter out duplicates if user specifies \"sch1, sch1\" */","html":" \t\t\t\t\u003cspan class=pl-c\u003e/* Filter out duplicates if user specifies \u0026quot;sch1, sch1\u0026quot; */\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":205,"right":204},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":205,"text":" \t\t\t\t*tables_schemas = list_append_unique_oid(*tables_schemas, schemaid);","html":" \t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":13,"left":206,"right":205},{"stylingDirective":null,"type":"DELETION","blobLineNumber":207,"text":"-\t\t\t\t*schemas = list_append_unique_oid(*schemas, schemaid);","html":"-\t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":207,"right":205},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":206,"text":" \t\t\t\tbreak;","html":" \t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":15,"left":208,"right":206},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":207,"text":" \t\t\tcase PUBLICATIONOBJ_SEQUENCES_IN_SCHEMA:","html":" \t\t\t\u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003ePUBLICATIONOBJ_SEQUENCES_IN_SCHEMA\u003c/span\u003e:","displayNoNewLineWarning":false,"position":16,"left":209,"right":207},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":208,"text":" \t\t\t\tschemaid = get_namespace_oid(pubobj-\u003ename, false);","html":" \t\t\t\t\u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eget_namespace_oid\u003c/span\u003e(\u003cspan class=pl-s1\u003epubobj\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ename\u003c/span\u003e, false);","displayNoNewLineWarning":false,"position":17,"left":210,"right":208},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":209,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":18,"left":211,"right":209},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":210,"text":" \t\t\t\t/* Filter out duplicates if user specifies \"sch1, sch1\" */","html":" \t\t\t\t\u003cspan class=pl-c\u003e/* Filter out duplicates if user specifies \u0026quot;sch1, sch1\u0026quot; */\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":212,"right":210},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":211,"text":" \t\t\t\t*sequences_schemas = list_append_unique_oid(*sequences_schemas, schemaid);","html":" \t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":20,"left":213,"right":211},{"stylingDirective":null,"type":"DELETION","blobLineNumber":214,"text":"-\t\t\t\t*schemas = list_append_unique_oid(*schemas, schemaid);","html":"-\t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":21,"left":214,"right":211},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":212,"text":" \t\t\t\tbreak;","html":" \t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":22,"left":215,"right":212},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":213,"text":" \t\t\tcase PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA:","html":" \t\t\t\u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003ePUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA\u003c/span\u003e:","displayNoNewLineWarning":false,"position":23,"left":216,"right":213},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":214,"text":" \t\t\t\tsearch_path = fetch_search_path(false);","html":" \t\t\t\t\u003cspan class=pl-s1\u003esearch_path\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003efetch_search_path\u003c/span\u003e(false);","displayNoNewLineWarning":false,"position":24,"left":217,"right":214},{"stylingDirective":null,"type":"HUNK","blobLineNumber":221,"text":"@@ -225,7 +222,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","html":"@@ -225,7 +222,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","displayNoNewLineWarning":false,"position":25,"left":224,"right":221},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":222,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":26,"left":225,"right":222},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":223,"text":" \t\t\t\t/* Filter out duplicates if user specifies \"sch1, sch1\" */","html":" \t\t\t\t\u003cspan class=pl-c\u003e/* Filter out duplicates if user specifies \u0026quot;sch1, sch1\u0026quot; */\u003c/span\u003e","displayNoNewLineWarning":false,"position":27,"left":226,"right":223},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":224,"text":" \t\t\t\t*tables_schemas = list_append_unique_oid(*tables_schemas, schemaid);","html":" \t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":28,"left":227,"right":224},{"stylingDirective":null,"type":"DELETION","blobLineNumber":228,"text":"-\t\t\t\t*schemas = list_append_unique_oid(*schemas, schemaid);","html":"-\t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":29,"left":228,"right":224},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":225,"text":" \t\t\t\tbreak;","html":" \t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":30,"left":229,"right":225},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":226,"text":" \t\t\tcase PUBLICATIONOBJ_SEQUENCES_IN_CUR_SCHEMA:","html":" \t\t\t\u003cspan class=pl-k\u003ecase\u003c/span\u003e \u003cspan class=pl-c1\u003ePUBLICATIONOBJ_SEQUENCES_IN_CUR_SCHEMA\u003c/span\u003e:","displayNoNewLineWarning":false,"position":31,"left":230,"right":226},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":227,"text":" \t\t\t\tsearch_path = fetch_search_path(false);","html":" \t\t\t\t\u003cspan class=pl-s1\u003esearch_path\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003efetch_search_path\u003c/span\u003e(false);","displayNoNewLineWarning":false,"position":32,"left":231,"right":227},{"stylingDirective":null,"type":"HUNK","blobLineNumber":234,"text":"@@ -239,7 +235,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","html":"@@ -239,7 +235,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,","displayNoNewLineWarning":false,"position":33,"left":238,"right":234},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":235,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":34,"left":239,"right":235},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":236,"text":" \t\t\t\t/* Filter out duplicates if user specifies \"sch1, sch1\" */","html":" \t\t\t\t\u003cspan class=pl-c\u003e/* Filter out duplicates if user specifies \u0026quot;sch1, sch1\u0026quot; */\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":240,"right":236},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":237,"text":" \t\t\t\t*sequences_schemas = list_append_unique_oid(*sequences_schemas, schemaid);","html":" \t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":36,"left":241,"right":237},{"stylingDirective":null,"type":"DELETION","blobLineNumber":242,"text":"-\t\t\t\t*schemas = list_append_unique_oid(*schemas, schemaid);","html":"-\t\t\t\t\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elist_append_unique_oid\u003c/span\u003e(\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemas\u003c/span\u003e, \u003cspan class=pl-s1\u003eschemaid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":37,"left":242,"right":237},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":238,"text":" \t\t\t\tbreak;","html":" \t\t\t\t\u003cspan class=pl-k\u003ebreak\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":243,"right":238},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":239,"text":" \t\t\tdefault:","html":" \t\t\t\u003cspan class=pl-k\u003edefault\u003c/span\u003e:","displayNoNewLineWarning":false,"position":39,"left":244,"right":239},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":240,"text":" \t\t\t\t/* shouldn't happen */","html":" \t\t\t\t\u003cspan class=pl-c\u003e/* shouldn\u0026#39;t happen */\u003c/span\u003e","displayNoNewLineWarning":false,"position":40,"left":245,"right":240},{"stylingDirective":null,"type":"HUNK","blobLineNumber":673,"text":"@@ -679,7 +674,6 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","html":"@@ -679,7 +674,6 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","displayNoNewLineWarning":false,"position":41,"left":678,"right":673},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":674,"text":" \tList\t *sequences = NIL;","html":" \t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":42,"left":679,"right":674},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":675,"text":" \tList\t *tables_schemaidlist = NIL;","html":" \t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":43,"left":680,"right":675},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":676,"text":" \tList\t *sequences_schemaidlist = NIL;","html":" \t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":44,"left":681,"right":676},{"stylingDirective":null,"type":"DELETION","blobLineNumber":682,"text":"-\tList\t *schemaidlist = NIL;","html":"-\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":45,"left":682,"right":676},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":677,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":46,"left":683,"right":677},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":678,"text":" \tbool\t\tfor_all_tables = false;","html":" \t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003efor_all_tables\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e false;","displayNoNewLineWarning":false,"position":47,"left":684,"right":678},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":679,"text":" \tbool\t\tfor_all_sequences = false;","html":" \t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003efor_all_sequences\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e false;","displayNoNewLineWarning":false,"position":48,"left":685,"right":679},{"stylingDirective":null,"type":"HUNK","blobLineNumber":699,"text":"@@ -706,6 +700,12 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","html":"@@ -706,6 +700,12 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","displayNoNewLineWarning":false,"position":49,"left":705,"right":699},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":700,"text":" \t\t\t\t(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),","html":" \t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_INSUFFICIENT_PRIVILEGE\u003c/span\u003e),","displayNoNewLineWarning":false,"position":50,"left":706,"right":700},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":701,"text":" \t\t\t\t errmsg(\"must be superuser to create FOR ALL TABLES publication\")));","html":" \t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;must be superuser to create FOR ALL TABLES publication\u0026quot;\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":51,"left":707,"right":701},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":702,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":52,"left":708,"right":702},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":703,"text":"+\t/* FOR ALL SEQUENCES requires superuser */","html":"+\t\u003cspan class=pl-c\u003e/* FOR ALL SEQUENCES requires superuser */\u003c/span\u003e","displayNoNewLineWarning":false,"position":53,"left":708,"right":703},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":704,"text":"+\tif (for_all_sequences \u0026\u0026 !superuser())","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003efor_all_sequences\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e !\u003cspan class=pl-en\u003esuperuser\u003c/span\u003e())","displayNoNewLineWarning":false,"position":54,"left":708,"right":704},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":705,"text":"+\t\tereport(ERROR,","html":"+\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":55,"left":708,"right":705},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":706,"text":"+\t\t\t\t(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),","html":"+\t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_INSUFFICIENT_PRIVILEGE\u003c/span\u003e),","displayNoNewLineWarning":false,"position":56,"left":708,"right":706},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":707,"text":"+\t\t\t\t errmsg(\"must be superuser to create FOR ALL SEQUENCES publication\")));","html":"+\t\t\t\t \u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;must be superuser to create FOR ALL SEQUENCES publication\u0026quot;\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":57,"left":708,"right":707},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":708,"text":"+","html":"+","displayNoNewLineWarning":false,"position":58,"left":708,"right":708},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":709,"text":" \trel = table_open(PublicationRelationId, RowExclusiveLock);","html":" \t\u003cspan class=pl-s1\u003erel\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003etable_open\u003c/span\u003e(\u003cspan class=pl-s1\u003ePublicationRelationId\u003c/span\u003e, \u003cspan class=pl-s1\u003eRowExclusiveLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":59,"left":709,"right":709},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":710,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":60,"left":710,"right":710},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":711,"text":" \t/* Check if name is used */","html":" \t\u003cspan class=pl-c\u003e/* Check if name is used */\u003c/span\u003e","displayNoNewLineWarning":false,"position":61,"left":711,"right":711},{"stylingDirective":null,"type":"HUNK","blobLineNumber":781,"text":"@@ -782,8 +782,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","html":"@@ -782,8 +782,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)","displayNoNewLineWarning":false,"position":62,"left":781,"right":781},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":782,"text":" \t\tObjectsInPublicationToOids(stmt-\u003epubobjects, pstate,","html":" \t\t\u003cspan class=pl-en\u003eObjectsInPublicationToOids\u003c/span\u003e(\u003cspan class=pl-s1\u003estmt\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003epubobjects\u003c/span\u003e, \u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":63,"left":782,"right":782},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":783,"text":" \t\t\t\t\t\t\t\t \u0026tables, \u0026sequences,","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etables\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences\u003c/span\u003e,","displayNoNewLineWarning":false,"position":64,"left":783,"right":783},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":784,"text":" \t\t\t\t\t\t\t\t \u0026tables_schemaidlist,","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e,","displayNoNewLineWarning":false,"position":65,"left":784,"right":784},{"stylingDirecti 8000 ve":null,"type":"DELETION","blobLineNumber":785,"text":"-\t\t\t\t\t\t\t\t \u0026sequences_schemaidlist,","html":"-\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e,","displayNoNewLineWarning":false,"position":66,"left":785,"right":784},{"stylingDirective":null,"type":"DELETION","blobLineNumber":786,"text":"-\t\t\t\t\t\t\t\t \u0026schemaidlist);","html":"-\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eschemaidlist\u003c/span\u003e);","displayNoNewLineWarning":false,"position":67,"left":786,"right":784},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":785,"text":"+\t\t\t\t\t\t\t\t \u0026sequences_schemaidlist);","html":"+\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e);","displayNoNewLineWarning":false,"position":68,"left":786,"right":785},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":786,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":69,"left":787,"right":786},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":787,"text":" \t\t/* FOR ALL TABLES IN SCHEMA requires superuser */","html":" \t\t\u003cspan class=pl-c\u003e/* FOR ALL TABLES IN SCHEMA requires superuser */\u003c/span\u003e","displayNoNewLineWarning":false,"position":70,"left":788,"right":787},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":788,"text":" \t\tif (list_length(tables_schemaidlist) \u003e 0 \u0026\u0026 !superuser())","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-en\u003elist_length\u003c/span\u003e(\u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e !\u003cspan class=pl-en\u003esuperuser\u003c/span\u003e())","displayNoNewLineWarning":false,"position":71,"left":789,"right":788},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1319,"text":"@@ -1321,7 +1320,7 @@ CheckAlterPublication(AlterPublicationStmt *stmt, HeapTuple tup,","html":"@@ -1321,7 +1320,7 @@ CheckAlterPublication(AlterPublicationStmt *stmt, HeapTuple tup,","displayNoNewLineWarning":false,"position":72,"left":1320,"right":1319},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1320,"text":" \t\t\t\t\t\tNameStr(pubform-\u003epubname)),","html":" \t\t\t\t\t\t\u003cspan class=pl-en\u003eNameStr\u003c/span\u003e(\u003cspan class=pl-s1\u003epubform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003epubname\u003c/span\u003e)),","displayNoNewLineWarning":false,"position":73,"left":1321,"right":1320},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1321,"text":" \t\t\t\t errdetail(\"Tables cannot be added to or dropped from FOR ALL TABLES publications.\")));","html":" \t\t\t\t \u003cspan class=pl-en\u003eerrdetail\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;Tables cannot be added to or dropped from FOR ALL TABLES publications.\u0026quot;\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":74,"left":1322,"right":1321},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1322,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":75,"left":1323,"right":1322},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1324,"text":"-\t/* Check that user is allowed to manipulate the publication tables. */","html":"-\t\u003cspan class=\"pl-c\"\u003e/* Check that user is allowed to manipulate the publication \u003cspan class=\"x x-first x-last\"\u003etables\u003c/span\u003e. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":76,"left":1324,"right":1322},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1323,"text":"+\t/* Check that user is allowed to manipulate the publication sequences. */","html":"+\t\u003cspan class=\"pl-c\"\u003e/* Check that user is allowed to manipulate the publication \u003cspan class=\"x x-first x-last\"\u003esequences\u003c/span\u003e. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":77,"left":1324,"right":1323},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1324,"text":" \tif (sequences \u0026\u0026 pubform-\u003epuballsequences)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003esequences\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003epubform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003epuballsequences\u003c/span\u003e)","displayNoNewLineWarning":false,"position":78,"left":1325,"right":1324},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1325,"text":" \t\tereport(ERROR,","html":" \t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e,","displayNoNewLineWarning":false,"position":79,"left":1326,"right":1325},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1326,"text":" \t\t\t\t(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),","html":" \t\t\t\t(\u003cspan class=pl-en\u003eerrcode\u003c/span\u003e(\u003cspan class=pl-c1\u003eERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE\u003c/span\u003e),","displayNoNewLineWarning":false,"position":80,"left":1327,"right":1326},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1460,"text":"@@ -1462,14 +1461,12 @@ AlterPublication(ParseState *pstate, AlterPublicationStmt *stmt)","html":"@@ -1462,14 +1461,12 @@ AlterPublication(ParseState *pstate, AlterPublicationStmt *stmt)","displayNoNewLineWarning":false,"position":81,"left":1461,"right":1460},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1461,"text":" \t\tList\t *sequences = NIL;","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":82,"left":1462,"right":1461},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1462,"text":" \t\tList\t *tables_schemaidlist = NIL;","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":83,"left":1463,"right":1462},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1463,"text":" \t\tList\t *sequences_schemaidlist = NIL;","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":84,"left":1464,"right":1463},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1465,"text":"-\t\tList\t *schemaidlist = NIL;","html":"-\t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eschemaidlist\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":85,"left":1465,"right":1463},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1464,"text":" \t\tOid\t\t\tpubid = pubform-\u003eoid;","html":" \t\t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epubid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003epubform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eoid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":86,"left":1466,"right":1464},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1465,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":87,"left":1467,"right":1465},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1466,"text":" \t\tObjectsInPublicationToOids(stmt-\u003epubobjects, pstate,","html":" \t\t\u003cspan class=pl-en\u003eObjectsInPublicationToOids\u003c/span\u003e(\u003cspan class=pl-s1\u003estmt\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003epubobjects\u003c/span\u003e, \u003cspan class=pl-s1\u003epstate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":88,"left":1468,"right":1466},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1467,"text":" \t\t\t\t\t\t\t\t \u0026tables, \u0026sequences,","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etables\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences\u003c/span\u003e,","displayNoNewLineWarning":false,"position":89,"left":1469,"right":1467},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1468,"text":" \t\t\t\t\t\t\t\t \u0026tables_schemaidlist,","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e,","displayNoNewLineWarning":false,"position":90,"left":1470,"right":1468},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1471,"text":"-\t\t\t\t\t\t\t\t \u0026sequences_schemaidlist,","html":"-\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e,","displayNoNewLineWarning":false,"position":91,"left":1471,"right":1468},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1472,"text":"-\t\t\t\t\t\t\t\t \u0026schemaidlist);","html":"-\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eschemaidlist\u003c/span\u003e);","displayNoNewLineWarning":false,"position":92,"left":1472,"right":1468},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1469,"text":"+\t\t\t\t\t\t\t\t \u0026sequences_schemaidlist);","html":"+\t\t\t\t\t\t\t\t \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003esequences_schemaidlist\u003c/span\u003e);","displayNoNewLineWarning":false,"position":93,"left":1472,"right":1469},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1470,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":94,"left":1473,"right":1470},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1471,"text":" \t\tCheckAlterPublication(stmt, tup,","html":" \t\t\u003cspan class=pl-en\u003eCheckAlterPublication\u003c/span\u003e(\u003cspan class=pl-s1\u003estmt\u003c/span\u003e, \u003cspan class=pl-s1\u003etup\u003c/span\u003e,","displayNoNewLineWarning":false,"position":95,"left":1474,"right":1471},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1472,"text":" \t\t\t\t\t\t\t tables, tables_schemaidlist,","html":" \t\t\t\t\t\t\t \u003cspan class=pl-s1\u003etables\u003c/span\u003e, \u003cspan class=pl-s1\u003etables_schemaidlist\u003c/span\u003e,","displayNoNewLineWarning":false,"position":96,"left":1475,"right":1472}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2097,"linesChanged":23,"newTreeEntry":{"lineCount":2097,"path":"src/backend/commands/publicationcmds.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/publicationcmds.c","mode":100644},"linesAdded":10,"linesDeleted":13,"path":"src/backend/commands/publicationcmds.c","pathDigest":"2273de23c3b0087e9bc36a1a0a1eb844399dc67da882a2df778f574c8e0d9e93","status":"MODIFIED","truncatedReason":null,"oldOid":"174877f1e344812f620fd8891af97104d5dfca13","newOid":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9","copilotChatReference":null,"deletedSha":"174877f1e344812f620fd8891af97104d5dfca13","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1803,"text":"@@ -1804,7 +1804,8 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)","html":"@@ -1804,7 +1804,8 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)","displayNoNewLineWarning":false,"position":0,"left":1803,"right":1803},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1804,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":1,"left":1804,"right":1804},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1805,"text":" \t\tOid\t\t\tschemaId = get_rel_namespace(relid);","html":" \t\t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eschemaId\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eget_rel_namespace\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":1805,"right":1805},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1806,"text":" \t\tList\t *pubids = GetRelationPublications(relid);","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003epubids\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eGetRelationPublications\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":1806,"right":1806},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1807,"text":"-\t\tchar\t\tobjectType = pub_get_object_type_for_relkind(get_rel_relkind(relid));","html":"-\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003eobjectType\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epub_get_object_type_for_relkind\u003c/span\u003e(\u003cspan class=pl-en\u003eget_rel_relkind\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e));","displayNoNewLineWarning":false,"position":4,"left":1807,"right":1806},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1807,"text":"+\t\tchar\t\trelkind = get_rel_relkind(relid);","html":"+\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003erelkind\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eget_rel_relkind\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":1807,"right":1807},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1808,"text":"+\t\tchar\t\tobjectType = pub_get_object_type_for_relkind(relkind);","html":"+\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003eobjectType\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epub_get_object_type_for_relkind\u003c/span\u003e(\u003cspan class=pl-s1\u003erelkind\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":1807,"right":1808},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1809,"text":" \t\t/*","html":" \t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":1808,"right":1809},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1810,"text":" \t\t * We don't acquire a lock on the namespace system table as we build","html":" \u003cspan class=pl-c\u003e\t\t * We don\u0026#39;t acquire a lock on the namespace system table as we build\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":1809,"right":1810},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1811,"text":" \t\t * the cache entry using a historic snapshot and all the later changes","html":" \u003cspan class=pl-c\u003e\t\t * the cache entry using a historic snapshot and all the later changes\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":1810,"right":1811},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1815,"text":"@@ -1815,7 +1816,6 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)","html":"@@ -1815,7 +1816,6 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)","displayNoNewLineWarning":false,"position":10,"left":1814,"right":1815},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1816,"text":" \t\tOid\t\t\tpublish_as_relid = relid;","html":" \t\t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epublish_as_relid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erelid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":11,"left":1815,"right":1816},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1817,"text":" \t\tint\t\t\tpublish_ancestor_level = 0;","html":" \t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003epublish_ancestor_level\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e;","displayNoNewLineWarning":false,"position":12,"left":1816,"right":1817},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1818,"text":" \t\tbool\t\tam_partition = get_rel_relispartition(relid);","html":" \t\t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003eam_partition\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eget_rel_relispartition\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":13,"left":1817,"right":1818},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1818,"text":"-\t\tchar\t\trelkind = get_rel_relkind(relid);","html":"-\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003erelkind\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eget_rel_relkind\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":1818,"right":1818},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1819,"text":" \t\tList\t *rel_publications = NIL;","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erel_publications\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":15,"left":1819,"right":1819},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1820,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":1820,"right":1820},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1821,"text":" \t\t/* Reload publications if needed before use. */","html":" \t\t\u003cspan class=pl-c\u003e/* Reload publications if needed before use. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":1821,"right":1821}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2173,"linesChanged":4,"newTreeEntry":{"lineCount":2173,"path":"src/backend/replication/pgoutput/pgoutput.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/replication/pgoutput/pgoutput.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/backend/replication/pgoutput/pgoutput.c","pathDigest":"0761c2bcb4648759470773c07b0d5c7300c178b42c8390046c08f4c48d209357","status":"MODIFIED","truncatedReason":null,"oldOid":"174877f1e344812f620fd8891af97104d5dfca13","newOid":"05843b1aa49df2ecc9b97c693b755bd1b6f856a9","copilotChatReference":null,"deletedSha":"174877f1e344812f620fd8891af97104d5dfca13","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/05843b1aa49df2ecc9b97c693b755bd1b6f856a9","fileTreeExpanded":true,"headerInfo":{"additions":14,"deletions":17,"filesChanged":4,"filesChangedString":"4"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":4,"truncated":false,"byteCount":5511,"lineShownCount":133},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"u9PstatwrKkxtCWHR5n6iChoDiiJRvFXwSvM5V-I9FbgJkjOikjt1VucK797DIO9UckNVL3xSnQl32m0Gr6Hvg"},"/users/diffview?diff=unified":{"post":"4p-rTREMCtQOSqAnw-7KDu3BvwAHPXzoDGumsVqt6JK5ag82MDRLqGRirh__e7M7lGC8fDOKx8vonwPgH5ubeg"},"/notifications/thread":{"post":"8Z9TXDqF2s1lU8NxBUyqPYyZH1UZzfdNN_s75mvPYsnTcBX95aH8mOtmTFo9aNOGd50heXf48tc2pM4gi-TlgA"}}},"title":"Minor improvements in sequence decoding code and docs · postgres/postgres@05843b1","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}

Commit 05843b1

Browse files
committed
Minor improvements in sequence decoding code and docs
A couple minor comment improvements and code cleanups, based on post-commit feedback to the sequence decoding patch. Author: Amit Kapila, vignesh C Discussion: https://postgr.es/m/aeb2ba8d-e6f4-5486-cc4c-0d4982c291cb@enterprisedb.com
1 parent 174877f commit 05843b1

File tree

4 files changed

+14
-17
lines changed

4 files changed

+14
-17
lines changed

doc/src/sgml/protocol.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7141,7 +7141,7 @@ Sequence
71417141
</term>
71427142
<listitem>
71437143
<para>
7144-
1 if the sequence update is transactions, 0 otherwise.
7144+
1 if the sequence update is transactional, 0 otherwise.
71457145
</para>
71467146
</listitem>
71477147
</varlistentry>

src/backend/catalog/pg_publication.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ AssertObjectTypeValid(char objectType)
193193
}
194194

195195
/*
196-
* Determine object type given the object type set for a schema.
196+
* Determine object type matching a given a relkind value.
197197
*/
198198
char
199199
pub_get_object_type_for_relkind(char relkind)

src/backend/commands/publicationcmds.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ parse_publication_options(ParseState *pstate,
175175
static void
176176
ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,
177177
List **tables, List **sequences,
178-
List **tables_schemas, List **sequences_schemas,
179-
List **schemas)
178+
List **tables_schemas, List **sequences_schemas)
180179
{
181180
ListCell *cell;
182181
PublicationObjSpec *pubobj;
@@ -204,14 +203,12 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,
204203

205204
/* Filter out duplicates if user specifies "sch1, sch1" */
206205
*tables_schemas = list_append_unique_oid(*tables_schemas, schemaid);
207-
*schemas = list_append_unique_oid(*schemas, schemaid);
208206
break;
209207
case PUBLICATIONOBJ_SEQUENCES_IN_SCHEMA:
210208
schemaid = get_namespace_oid(pubobj->name, false);
211209

212210
/* Filter out duplicates if user specifies "sch1, sch1" */
213211
*sequences_schemas = list_append_unique_oid(*sequences_schemas, schemaid);
214-
*schemas = list_append_unique_oid(*schemas, schemaid);
215212
break;
216213
case PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA:
217214
search_path = fetch_search_path(false);
@@ -225,7 +222,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,
225222

226223
/* Filter out duplicates if user specifies "sch1, sch1" */
227224
*tables_schemas = list_append_unique_oid(*tables_schemas, schemaid);
228-
*schemas = list_append_unique_oid(*schemas, schemaid);
229225
break;
230226
case PUBLICATIONOBJ_SEQUENCES_IN_CUR_SCHEMA:
231227
search_path = fetch_search_path(false);
@@ -239,7 +235,6 @@ ObjectsInPublicationToOids(List *pubobjspec_list, ParseState *pstate,
239235

240236
/* Filter out duplicates if user specifies "sch1, sch1" */
241237
*sequences_schemas = list_append_unique_oid(*sequences_schemas, schemaid);
242-
*schemas = list_append_unique_oid(*schemas, schemaid);
243238
break;
244239
default:
245240
/* shouldn't happen */
@@ -679,7 +674,6 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
679674
List *sequences = NIL;
680675
List *tables_schemaidlist = NIL;
681676
List *sequences_schemaidlist = NIL;
682-
List *schemaidlist = NIL;
683677

684678
bool for_all_tables = false;
685679
bool for_all_sequences = false;
@@ -706,6 +700,12 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
706700
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
707701
errmsg("must be superuser to create FOR ALL TABLES publication")));
708702

703+
/* FOR ALL SEQUENCES requires superuser */
704+
if (for_all_sequences && !superuser())
705+
ereport(ERROR,
706+
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
707+
errmsg("must be superuser to create FOR ALL SEQUENCES publication")));
708+
709709
rel = table_open(PublicationRelationId, RowExclusiveLock);
710710

711711
/* Check if name is used */
@@ -782,8 +782,7 @@ CreatePublication(ParseState *pstate, CreatePublicationStmt *stmt)
782782
ObjectsInPublicationToOids(stmt->pubobjects, pstate,
783783
&tables, &sequences,
784784
&tables_schemaidlist,
785-
&sequences_schemaidlist,
786-
&schemaidlist);
785+
&sequences_schemaidlist);
787786

788787
/* FOR ALL TABLES IN SCHEMA requires superuser */
789788
if (list_length(tables_schemaidlist) > 0 && !superuser())
@@ -1321,7 +1320,7 @@ CheckAlterPublication(AlterPublicationStmt *stmt, HeapTuple tup,
13211320
NameStr(pubform->pubname)),
13221321
errdetail("Tables cannot be added to or dropped from FOR ALL TABLES publications.")));
13231322

1324-
/* Check that user is allowed to manipulate the publication tables. */
1323+
/* Check that user is allowed to manipulate the publication sequences. */
13251324
if (sequences && pubform->puballsequences)
13261325
ereport(ERROR,
13271326
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
@@ -1462,14 +1461,12 @@ AlterPublication(ParseState *pstate, AlterPublicationStmt *stmt)
14621461
List *sequences = NIL;
14631462
List *tables_schemaidlist = NIL;
14641463
List *sequences_schemaidlist = NIL;
1465-
List *schemaidlist = NIL;
14661464
Oid pubid = pubform->oid;
14671465

14681466
ObjectsInPublicationToOids(stmt->pubobjects, pstate,
14691467
&tables, &sequences,
14701468
&tables_schemaidlist,
1471-
&sequences_schemaidlist,
1472-
&schemaidlist);
1469+
&sequences_schemaidlist);
14731470

14741471
CheckAlterPublication(stmt, tup,
14751472
tables, tables_schemaidlist,

src/backend/replication/pgoutput/pgoutput.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,8 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)
18041804
{
18051805
Oid schemaId = get_rel_namespace(relid);
18061806
List *pubids = GetRelationPublications(relid);
1807-
char objectType = pub_get_object_type_for_relkind(get_rel_relkind(relid));
1807+
char relkind = get_rel_relkind(relid);
1808+
char objectType = pub_get_object_type_for_relkind(relkind);
18081809
/*
18091810
* We don't acquire a lock on the namespace system table as we build
18101811
* the cache entry using a historic snapshot and all the later changes
@@ -1815,7 +1816,6 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)
18151816
Oid publish_as_relid = relid;
18161817
int publish_ancestor_level = 0;
18171818
bool am_partition = get_rel_relispartition(relid);
1818-
char relkind = get_rel_relkind(relid);
18191819
List *rel_publications = NIL;
18201820

18211821
/* Reload publications if needed before use. */

0 commit comments

Comments
 (0)
0