Re: [HACKERS] dblink get_connect_string() passes FDW option"updatable" to the connect string, connection fails. - Mailing list pgsql-hackers

From Joe Conway
Subject Re: [HACKERS] dblink get_connect_string() passes FDW option"updatable" to the connect string, connection fails.
Date
Msg-id 1a96cd84-8373-7281-6b9a-e81353e88e49@joeconway.com
Whole thread Raw
In response to Re: [HACKERS] dblink get_connect_string() passes FDW option"updatable" to the connect string, connection fails.  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
On 12/18/2016 02:47 PM, Corey Huinker wrote:
> On Sun, Dec 18, 2016 at 4:57 PM, Michael Paquier wrote:
>> On Mon, Dec 19, 2016 at 6:48 AM, Joe Conway wrote:
>>> Maybe if "CREATE FOREIGN DATA WRAPPER" had a way to specify that the FDW
>>> supports a libpq connection it would make sense to allows other FDWs
>>> with this attribute, but since there is none the current state strikes
>>> me as a bad idea.
>>> Thoughts?

>> libpq is proper to the implementation of the FDW, not the wrapper on
>> top of it, so using in the CREATE FDW command a way to do the
>> decision-making that does not look right to me. Filtering things at
>> connection attempt is a better solution.

> The only benefit I see would be giving the user a slightly more clear
> error message like ('dblink doesn't work with %', 'mysql') instead of
> the error about the failure of the connect string generated by the
> options that did overlap.

Ok, I committed Corey's patch with only minor whitespace changes.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Potential data loss of 2PC files