Re: pgsql_fdw, FDW for PostgreSQL server

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql_fdw, FDW for PostgreSQL server
Дата
Msg-id 3084.1331059180@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql_fdw, FDW for PostgreSQL server  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: pgsql_fdw, FDW for PostgreSQL server
Re: pgsql_fdw, FDW for PostgreSQL server
Список 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 по дате отправления:

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: elegant and effective way for running jobs inside a database
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Checksums, state of play