COPY formatting

Поиск
Список
Период
Сортировка
От Karel Zak
Тема COPY formatting
Дата
Msg-id 20040317143813.GB17580@zf.jcu.cz
обсуждение исходный текст
Ответы Re: COPY formatting  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Re: COPY formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: COPY formatting  (Andrew Dunstan <andrew@dunslane.net>)
COPY formatting  (Lee Kindness <lkindness@csl.co.uk>)
Список pgsql-hackers
Hi,
in TODO is item: "* Allow dump/load of CSV format". I don't thinkit's clean idea. Why CSV and why not something other?
:-)
 
A why not allow to users full control of the format by they ownfunction. It means something like:COPY tablename [ (
column[, ...] ) ]    TO { 'filename' | STDOUT }    [ [ WITH ]          [ BINARY ]         [ OIDS ]         [ DELIMITER
[AS ] 'delimiter' ]         [ NULL [ AS ] 'null string' ]         [ FORMAT funcname ] ]          ^^^^^^^^^^^^^^^^
                                        The formatting function API can be pretty simple:
 
text *my_copy_format(text *attrdata, int direction,             int nattrs, int attr, oid attrtype, oid relation)
-- it's pseudocode of course, it should be use standard fmgrinterface.It's probably interesting for non-binary COPY
version.Comments?
   Karel

-- Karel Zak  <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/


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

Предыдущее
От: "BARTKO, Zoltan"
Дата:
Сообщение: Re: Doxygen?
Следующее
От: Hans-Jürgen Schönig
Дата:
Сообщение: Re: COPY formatting