diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-05-08 14:01:00 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-05-08 14:01:00 -0400 |
commit | fe974cc5a69903e9f53b36d6e2709fd3de0a1ac7 (patch) | |
tree | ba6ed5745ed39bd63affbc1af498a2d5eb652a4b /src/backend/commands/subscriptioncmds.c | |
parent | c89d2d0204f25e556e94dabd0fd5174cf6963b1d (diff) | |
download | postgresql-fe974cc5a69903e9f53b36d6e2709fd3de0a1ac7.tar.gz postgresql-fe974cc5a69903e9f53b36d6e2709fd3de0a1ac7.zip |
Check connection info string in ALTER SUBSCRIPTION
Previously it would allow an invalid connection string to be set.
Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reported-by: tushar <tushar.ahuja@enterprisedb.com>
Diffstat (limited to 'src/backend/commands/subscriptioncmds.c')
-rw-r--r-- | src/backend/commands/subscriptioncmds.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index ee0983fd87e..fde9e6e20cd 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -653,6 +653,11 @@ AlterSubscription(AlterSubscriptionStmt *stmt) } case ALTER_SUBSCRIPTION_CONNECTION: + /* Load the library providing us libpq calls. */ + load_file("libpqwalreceiver", false); + /* Check the connection info string. */ + walrcv_check_conninfo(stmt->conninfo); + values[Anum_pg_subscription_subconninfo - 1] = CStringGetTextDatum(stmt->conninfo); replaces[Anum_pg_subscription_subconninfo - 1] = true; |