RE: Copy and serial type problem

From: "Creager, Robert S" <CreagRS(at)LOUISVILLE(dot)STORTEK(dot)COM>
To: pgsql-general(at)postgresql(dot)org
Subject: RE: Copy and serial type problem
Date: 2001-07-23 19:13:06
Message-ID: 10FE17AD5F7ED31188CE002048406DE8514E3D@lsv-msg06.stortek.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


You don't indicate how you're executing the copy. If you're using a
script/program, just add your own counter as the first field in the copy. I
do this 'all the time' from Perl scripts, and it works fine. If you're
using psql, I haven't a clue unless you massage the input data before doing
the copy.

Rob

> -----Original Message-----
> From: Przemyslaw 'Morp][ik' Berlinski
> [mailto:morphik(at)irc(dot)nospam(dot)gdansk(dot)pl]
> Sent: Sunday, July 22, 2001 1:13 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] Copy and serial type problem
>
>
> Hi,
>
> I've created a small table:
>
> CREATE TABLE "table" (
> "id" int4 DEFAULT nextval('"table_idd_seq"') NOT NULL,
> "file" character varying(40) NOT NULL
> );
>
> Table sequence 'table_idd_seq' is also available with a next
> id number.
>
> Question is how to use postgres copy function with this 'id'.
> Table 'table'
> is not empty... I've tried to insert nextval("table_idd_seq")
> into file but
> it doesn't work.
>
> Any help would be appreciated.
>
> TIA
> Morp][ik
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to
> majordomo(at)postgresql(dot)org)
>

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-07-23 19:18:39 Re: Re: epoch to show millseconds
Previous Message Mitch Vincent 2001-07-23 19:02:13 Re: pqReadData() -- backend closed the channel unexpectedly.