From a81e5516fa4bc53e332cb35eefe231147c0e1749 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Wed, 13 Sep 2023 09:48:31 +0530 Subject: 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 --- src/backend/commands/subscriptioncmds.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/backend/commands/subscriptioncmds.c') 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] = -- cgit v1.2.3