Re: SQL/MED - file_fdw

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: SQL/MED - file_fdw
Дата
Msg-id AANLkTikCt6bHXZjO_oX+JS7+G=jAQ7gVZPu0Owjcsbfb@mail.gmail.com
обсуждение исходный текст
Ответ на SQL/MED - file_fdw  (Shigeru HANADA <hanada@metrosystems.co.jp>)
Ответы Re: SQL/MED - file_fdw  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
2010/11/25 Shigeru HANADA <hanada@metrosystems.co.jp>:
> Hi, hackers,
>
> Attached is a patch that adds file_fdw, FDW which reads records from
> files on the server side, as a contrib module.  This patch is based on
> "SQL/MED core functionality" patch.
>
> [SQL/MED - core functionality]
> http://archives.postgresql.org/pgsql-hackers/2010-11/msg01698.php
>
> File_fdw can be installed with the steps similar to other contrib
> modules, and you can create FDW with the script:
>    $SHAREDIR/contrib/file_fdw.sql
> Note that you need to create file_fdw for each database.
>
> Document for file_fdw is included in the patch, although the contents
> might not be enough.
>
> Any comments and questions are welcome.

I think it is better to add encoding option to FileFdwOption. In the
patch the encoding of file is assumed as client_encoding, but we may
want to SELECT from different-encoded csv in a query.

Apart from the issue with fdw, I've been thinking client_encoding for
COPY is not appropriate in any way. client_encoding is the encoding of
the statement the client sends, not the COPY target which is on the
server's filesystem. Adding encoding option to COPY will eliminate
allowEncodingChanges option from JDBC driver.

Regards,



--
Hitoshi Harada


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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: pg_execute_from_file review
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Comment typo in xlog.c