diff options
author | Amit Kapila <akapila@postgresql.org> | 2023-09-13 09:48:31 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2023-09-13 09:48:31 +0530 |
commit | a81e5516fa4bc53e332cb35eefe231147c0e1749 (patch) | |
tree | 35ab25f5884219aec33dc71ea2deda446e043a1d /src/backend/commands/subscriptioncmds.c | |
parent | f899c7f1eae43a95ae5d221e754283d8fcfe8bc1 (diff) | |
download | postgresql-a81e5516fa4bc53e332cb35eefe231147c0e1749.tar.gz postgresql-a81e5516fa4bc53e332cb35eefe231147c0e1749.zip |
Fix the ALTER SUBSCRIPTION to reflect the change in run_as_owner option.
Reported-by: Jeff Davis
Author: Hou Zhijie
Reviewed-by: Amit Kapila
Backpatch-through: 16
Discussion: http://postgr.es/m/17b62714fd115bd1899afd922954540a5c6a0467.camel@j-davis.com
Diffstat (limited to 'src/backend/commands/subscriptioncmds.c')
-rw-r--r-- | src/backend/commands/subscriptioncmds.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 34d881fd94f..6fe111e98d3 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -1204,6 +1204,13 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt, = true; } + if (IsSet(opts.specified_opts, SUBOPT_RUN_AS_OWNER)) + { + values[Anum_pg_subscription_subrunasowner - 1] = + BoolGetDatum(opts.runasowner); + replaces[Anum_pg_subscription_subrunasowner - 1] = true; + } + if (IsSet(opts.specified_opts, SUBOPT_ORIGIN)) { values[Anum_pg_subscription_suborigin - 1] = |