COPY and sequences - Mailing list pgsql-bugs

From todhunter
Subject COPY and sequences
Date
Msg-id 000b01c3a567$c0051940$0b01a8c0@ZIK
Whole thread Raw
List pgsql-bugs
Hello
I dont know is this a bug but when I use COPY to load data into table seque=
nce of the primary key in this table have always start value =3D 1. But in =
the table is about 13000 rows :-). I wrote script like this to coorect this=
 sequence

select setval('public.kom_kontrahenciref_idkre_seq',(select max(idkre) from=
 kom_kontrahenciref),true);
and that's all


Thank's for listening :-)

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: pg_dump function dumped after required for table definition
Next
From: "Eric Jain"
Date:
Subject: Can't create index on text column