Re: [HACKERS] expand_dbname in postgres_fdw

Поиск
Список
Период
Сортировка
От Ashutosh Bapat
Тема Re: [HACKERS] expand_dbname in postgres_fdw
Дата
Msg-id CAFjFpRcqAXcy6s44N9RhE0ORtYBJawPTDuhQV86UG5ONNUE=pA@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] expand_dbname in postgres_fdw  (Arseny Sher <a.sher@postgrespro.ru>)
Ответы Re: [HACKERS] expand_dbname in postgres_fdw  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Jul 26, 2017 at 12:17 AM, Arseny Sher <a.sher@postgrespro.ru> wrote:
> Hi,
>
> Is there any particular reason why postgres_fdw forbids usage of
> connection strings by passing expand_dbname = false to
> PQconnectdbParams? Attached patch shows where this happens.
>

According to F.34.1.1 at [1] passing connection string as dbname
option should work, so your question is valid. I am not aware of any
discussion around this on hackers. Comments in connect_pg_server()
don't help either. But I guess, we expect users to set up individual
foreign server and user mapping options instead of putting those in a
connection string. I can not think of any reason except that it
improves readability. If postgres_fdw wants to take certain actions
based on the values of individual options, having them separate is
easier to handle than parsing them out of a connection string.

Any way, if we are not going to change current behaviour, we should
change the documentation and say that option dbname means "database
name" and not a connection string.

[1] https://www.postgresql.org/docs/10/static/postgres-fdw.html#idm44880567492496
-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Rafia Sabih
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Следующее
От: tushar
Дата:
Сообщение: [HACKERS] pg_upgrade failed with error - ERROR: column "a" in child table mustbe marked NOT NULL