Re: IMPORT FOREIGN SCHEMA statement

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: IMPORT FOREIGN SCHEMA statement
Дата
Msg-id 18849.1404927040@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: IMPORT FOREIGN SCHEMA statement  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: IMPORT FOREIGN SCHEMA statement  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: IMPORT FOREIGN SCHEMA statement  (Michael Paquier <michael.paquier@gmail.com>)
Re: IMPORT FOREIGN SCHEMA statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: IMPORT FOREIGN SCHEMA statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> With that, I am marking this patch as ready for committer.

I've started looking at this patch.  I wonder whether it's really such
a great idea to expect the FDW to return a list of parsetrees for
CREATE FOREIGN TABLE commands; that seems like a recipe for breakage
anytime we change the parsetree representation, say add a field to
ColumnDef.  The alternative I'm thinking about is to have the FDW pass
back a list of strings, which would be textual CREATE FOREIGN TABLE
commands.  This seems like it'd be more robust and in most cases not
any harder for the FDW to generate; moreover, it would greatly improve
the quality of error reporting anytime there was anything wrong with
what the FDW did.

As against that, you could point out that we make FDWs deal with
parsetrees when doing planning.  But the important difference there
is that they're mostly *reading* the parsetrees, not building new
ones from scratch, so there's much less opportunity for errors of
omission.

Comments?
        regards, tom lane



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: postgresql.auto.conf and reload
Следующее
От: Sawada Masahiko
Дата:
Сообщение: Re: add line number as prompt option to psql