Re: pgsql_fdw, FDW for PostgreSQL server - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgsql_fdw, FDW for PostgreSQL server
Date
Msg-id 3084.1331059180@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql_fdw, FDW for PostgreSQL server  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: pgsql_fdw, FDW for PostgreSQL server  (Peter Eisentraut <peter_e@gmx.net>)
Re: pgsql_fdw, FDW for PostgreSQL server  (Shigeru HANADA <shigeru.hanada@gmail.com>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On tor, 2012-03-01 at 20:56 +0900, Shigeru Hanada wrote:
>> How about moving postgresql_fdw_validator into dblink,

> That's probably a good move.  If this were C++, we might try to subclass
> this whole thing a bit, to avoid code duplication, but I don't see an
> easy way to do that here.

>> with renaming to dblink_fdw_validator? 

> Well, it's not the validator of the dblink_fdw, so maybe something like
> basic_postgresql_fdw_validator.

I don't understand this objection.  If we move it into dblink, then it
*is* dblink's validator, and nobody else's.

A bigger issue with postgresql_fdw_validator is that it supposes that
the core backend is authoritative as to what options libpq supports,
which is bad design on its face.  It would be much more sensible for
dblink to be asking libpq what options libpq supports, say via
PQconndefaults().

We might find that we have to leave postgresql_fdw_validator as-is
for backwards compatibility reasons (in particular, being able to load
existing FDW definitions) but I think we should migrate away from using
it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: elegant and effective way for running jobs inside a database
Next
From: Bruce Momjian
Date:
Subject: Re: Checksums, state of play