mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user