EnterpriseDB / mysql_fdw

PostgreSQL foreign data wrapper for MySQL
Other
530 stars 162 forks source link

ALTER SERVER does not work for ssl_cert and ssl_key #141

Open Ramblurr opened 7 years ago

Ramblurr commented 7 years ago

Creating a server with the ssl_cert and ssl_key options works fine, however ALTERing it does not.

Reproduce

  1. Create a server
CREATE SERVER test_server
FOREIGN DATA WRAPPER mysql_fdw
OPTIONS (
  host 'example.com',
  port '3306',
);
  1. Attempt to alter its options

This should work, but it does not:

ALTER SERVER test_server OPTIONS (
SET host 'example.com',
SET port '3306',
SET ssl_cert '/right/path/cert',
SET ssl_key '/right/path/key'
);
--- does not work

Error: [42704] ERROR: option "ssl_cert" not found

However setting only the host /port works!

ALTER SERVER test_server OPTIONS (
SET host 'newexample.com',
SET port '3307'
);
-- works