Copy and serial type problem 
Author Message
 Copy and serial type problem

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.


> -----Original Message-----
> From: Przemyslaw 'Morp][ik' Berlinski

> Sent: Sunday, July 22, 2001 1:13 PM

> 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.

> Morp][ik

> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Sat, 10 Jan 2004 04:12:40 GMT
 [ 1 post ] 

 Relevant Pages 

1. COPY INTO and the SERIAL data type

2. Powerbuilder problem with Informix serial types

3. Problems with COPY and LONG data type

4. Copy To...Type Delimited, Problem

5. PfW 5.0 TCursor type table copy problem

6. serial type as foreign key referential integrity

7. SERIAL data type

8. serial data type

9. About serial type

10. Serial data type not starting at 1

11. going crazy with serial type

12. serial data type

Powered by phpBB® Forum Software