Re: Can you use array data types w/ the COPY command?

Поиск
Список
Период
Сортировка
От will trillich
Тема Re: Can you use array data types w/ the COPY command?
Дата
Msg-id 20030131232656.GC1464@mail.serensoft.com
обсуждение исходный текст
Ответ на Can you use array data types w/ the COPY command?  ("Peter E. Chen" <pchen3@jhmi.edu>)
Список pgsql-general
On Wed, Jan 29, 2003 at 03:31:06PM -0500, Peter E. Chen wrote:
> Dear All,
>
> Is there anyway to use the COPY command to bulkload a flat-file containing a
> column of csv's into a table w/ an integer[] data type?

here's how i'd find out--

    create temp table test(
        i int[],
        v varchar
    );

    insert into test values('{0}','zero');
    insert into test values('{1,20,300,4000}','trend');
    insert into test values('{2020}','vision');
    insert into test values('{1,2,4,8,16,32,64,128}','binary');

    copy test to stdout;

and see what format it uses. that's probably what it'll want on
the read-it-back-in side.

--
There are 10 kinds of people:
ones that get binary, and ones that don't.

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Looking for a firewall? Do you think smoothwall sucks? You're
probably right... Try the folks at http://clarkconnect.org/ !

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

Предыдущее
От: Garo Hussenjian
Дата:
Сообщение: Re: Query gone wild
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: SQL-question (JOIN)