Re: dblink get_connect_string() passes FDW option "updatable" to the connect string, connection fails.
От | Tom Lane |
---|---|
Тема | Re: dblink get_connect_string() passes FDW option "updatable" to the connect string, connection fails. |
Дата | |
Msg-id | 30733.1479755784@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | dblink get_connect_string() passes FDW option "updatable" to the connect string, connection fails. (Corey Huinker <corey.huinker@gmail.com>) |
Ответы |
Re: dblink get_connect_string() passes FDW option
"updatable" to the connect string, connection fails.
Re: dblink get_connect_string() passes FDW option "updatable" to the connect string, connection fails. |
Список | pgsql-hackers |
Corey Huinker <corey.huinker@gmail.com> writes: > I ran into this today: > CREATE SERVER bob_srv FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( host > 'localhost', dbname :'current_db' ); > ... > ALTER SERVER bob_srv OPTIONS (updatable 'true'); > SELECT * > FROM dblink('bob_srv','SELECT 1') as t(x integer); > psql:bug_example.sql:18: ERROR: could not establish connection > DETAIL: invalid connection option "updatable" > Is this something we want to fix? The dblink docs recommend using dblink_fdw as the FDW for this purpose, which would only accept legal connstr options. However, I can see the point of using a postgres_fdw server instead, and considering that dblink isn't actually enforcing use of any particular FDW type, it seems like the onus should be on it to be more wary of what the options are. It looks like this might be fairly easy to fix by having get_connect_string() use is_valid_dblink_option() to check each option name, and silently ignore options that are inappropriate. regards, tom lane
В списке pgsql-hackers по дате отправления: