Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-27 Thread Arseny Sher
Tom Lane writes: > I really don't see anything wrong with the FDW's documentation. To claim > that it's not clear, you have to suppose that a connstring's dbname field > is allowed to recursively contain a connstring. However, if you've got a > concrete suggestion about improving the wording, l

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-27 Thread Tom Lane
Arseny Sher writes: > Attached patch allows dbname expansion and makes sure that it doesn't > contain any invalid options. I'm pretty much against this in principle. It complicates both the code and the conceptual API, for no serious gain, even if you take it on faith that it doesn't and never w

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-27 Thread Arseny Sher
On Thu, Jul 27, 2017 at 12:21 AM, Tom Lane wrote: > The main problem to my mind is that a connection string could possibly > override items meant to be specified elsewhere. In particular it ought > not be allowed to specify the remote username or password, because those > are supposed to come fro

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-26 Thread Ashutosh Bapat
On Thu, Jul 27, 2017 at 12:21 AM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Jul 26, 2017 at 5:38 AM, Ashutosh Bapat >> wrote: >>> 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

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-26 Thread Tom Lane
Robert Haas writes: > On Wed, Jul 26, 2017 at 5:38 AM, Ashutosh Bapat > wrote: >> 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. > I kind of wonder if this had some sec

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-26 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Jul 26, 2017 at 5:38 AM, Ashutosh Bapat > wrote: > > 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

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-26 Thread Robert Haas
On Wed, Jul 26, 2017 at 5:38 AM, Ashutosh Bapat wrote: > 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

Re: [HACKERS] expand_dbname in postgres_fdw

2017-07-26 Thread Ashutosh Bapat
On Wed, Jul 26, 2017 at 12:17 AM, Arseny Sher 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

[HACKERS] expand_dbname in postgres_fdw

2017-07-25 Thread Arseny Sher
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. >From 6bf3741976b833379f5bb370aa41f73a51b99afd Mon Sep 17 00:00:00 2001 From: Arseny Sher Date: Tue, 25 Jul 2017