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

Commit01e27aa

Browse files
author
Amit Kapila
committed
Use correct variable name in publicationcmds.c.
subid was used at few places for publicationid in publicationcmds.c/.h.Author: vignesh C <vignesh21@gmail.com>Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>Discussion:https://postgr.es/m/CALDaNm1KqJ0VFfDJRPbfYi9Shz6LHFEE-Ckn+eqsePfKhebv9w@mail.gmail.com
1 parentc462b05 commit01e27aa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎src/backend/commands/publicationcmds.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ AlterPublicationOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId)
20522052
ObjectAddress
20532053
AlterPublicationOwner(constchar*name,OidnewOwnerId)
20542054
{
2055-
Oidsubid;
2055+
Oidpubid;
20562056
HeapTupletup;
20572057
Relationrel;
20582058
ObjectAddressaddress;
@@ -2068,11 +2068,11 @@ AlterPublicationOwner(const char *name, Oid newOwnerId)
20682068
errmsg("publication \"%s\" does not exist",name)));
20692069

20702070
pubform= (Form_pg_publication)GETSTRUCT(tup);
2071-
subid=pubform->oid;
2071+
pubid=pubform->oid;
20722072

20732073
AlterPublicationOwner_internal(rel,tup,newOwnerId);
20742074

2075-
ObjectAddressSet(address,PublicationRelationId,subid);
2075+
ObjectAddressSet(address,PublicationRelationId,pubid);
20762076

20772077
heap_freetuple(tup);
20782078

@@ -2085,19 +2085,19 @@ AlterPublicationOwner(const char *name, Oid newOwnerId)
20852085
* Change publication owner -- by OID
20862086
*/
20872087
void
2088-
AlterPublicationOwner_oid(Oidsubid,OidnewOwnerId)
2088+
AlterPublicationOwner_oid(Oidpubid,OidnewOwnerId)
20892089
{
20902090
HeapTupletup;
20912091
Relationrel;
20922092

20932093
rel=table_open(PublicationRelationId,RowExclusiveLock);
20942094

2095-
tup=SearchSysCacheCopy1(PUBLICATIONOID,ObjectIdGetDatum(subid));
2095+
tup=SearchSysCacheCopy1(PUBLICATIONOID,ObjectIdGetDatum(pubid));
20962096

20972097
if (!HeapTupleIsValid(tup))
20982098
ereport(ERROR,
20992099
(errcode(ERRCODE_UNDEFINED_OBJECT),
2100-
errmsg("publication with OID %u does not exist",subid)));
2100+
errmsg("publication with OID %u does not exist",pubid)));
21012101

21022102
AlterPublicationOwner_internal(rel,tup,newOwnerId);
21032103

‎src/include/commands/publicationcmds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern void RemovePublicationRelById(Oid proid);
2929
externvoidRemovePublicationSchemaById(Oidpsoid);
3030

3131
externObjectAddressAlterPublicationOwner(constchar*name,OidnewOwnerId);
32-
externvoidAlterPublicationOwner_oid(Oidsubid,OidnewOwnerId);
32+
externvoidAlterPublicationOwner_oid(Oidpubid,OidnewOwnerId);
3333
externvoidInvalidatePublicationRels(List*relids);
3434
externboolpub_rf_contains_invalid_column(Oidpubid,Relationrelation,
3535
List*ancestors,boolpubviaroot);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp