Re: COPY TO order - Mailing list pgsql-general

From Clodoaldo Pinto Neto
Subject Re: COPY TO order
Date
Msg-id 20040412191701.80181.qmail@web40903.mail.yahoo.com
Whole thread Raw
In response to Re: COPY TO order  (Guy Fraser <guy@incentre.net>)
Responses Re: COPY TO order
List pgsql-general
 --- Guy Fraser <guy@incentre.net>

> If you have a 'serial' or 'bigserial' field like this :
>
> create table test_table (
> test_id bigserial,
> data integer,
> comment text
> );
>
> and you use :
>
> copy test_table (data,comment)
> from '/wherever/the/file/is'
> using delimiters ',';
>
>
> to insert data like this :
>
> 27,some kind of entry
> 32,another kind of entry
> 16,yet another entry
> ...
>
> Assuming this is the first set of data entered the table will get populated
> with :
>
>  1 | 27 | some kind of entry
>  2 | 32 | another kind of entry
>  3 | 16 | yet another entry
> ...
>
> I have used this in the past and it works well.

The problem I have is with COPY TO and not COPY FROM as I need to write a file.

Regards,
Clodoaldo

______________________________________________________________________

Yahoo! Messenger - Fale com seus amigos online. Instale agora!
http://br.download.yahoo.com/messenger/

pgsql-general by date:

Previous
From: Igor Shevchenko
Date:
Subject: db schema diff
Next
From:
Date:
Subject: Re: db schema diff