Re: IMPORT FOREIGN SCHEMA statement
От | Albe Laurenz |
---|---|
Тема | Re: IMPORT FOREIGN SCHEMA statement |
Дата | |
Msg-id | A737B7A37273E048B164557ADEF4A58B17CFE029@ntex2010i.host.magwien.gv.at обсуждение исходный текст |
Ответ на | IMPORT FOREIGN SCHEMA statement (Ronan Dunklau <ronan.dunklau@dalibo.com>) |
Ответы |
Re: IMPORT FOREIGN SCHEMA statement
|
Список | pgsql-hackers |
Ronan Dunklau wrote: > Since my last proposal didn't get any strong rebuttal, please find attached a > more complete version of the IMPORT FOREIGN SCHEMA statement. > > I tried to follow the SQL-MED specification as closely as possible. > > This adds discoverability to foreign servers. The structure of the statement > as I understand it is simple enough: > > IMPORT FOREIGN SCHEMA remote_schema FROM SERVER some_server [ (LIMIT TO | > EXCEPT) table_list ] INTO local_schema. > > The import_foreign_schema patch adds the infrastructure, and a new FDW > routine: > > typedef List *(*ImportForeignSchema_function) (ForeignServer *server, > ImportForeignSchemaStmt * parsetree); > > This routine must return a list of CreateForeignTableStmt mirroring whatever > tables were found on the remote side, which will then be executed. In addition to data type mapping questions (which David already raised) I have one problem when I think of the Oracle FDW: Oracle follows the SQL standard in folding table names to upper case. So this would normally result in a lot of PostgreSQL foreign tables with upper case names, which would be odd and unpleasant. I cannot see a way out of that, but I thought I should mention it. Yours, Laurenz Albe
В списке pgsql-hackers по дате отправления: