COPY and sequences

From: "todhunter" <todhunter(at)interia(dot)pl>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: COPY and sequences
Date: 2003-11-07 19:44:51
Message-ID: 000b01c3a567$c0051940$0b01a8c0@ZIK
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello
I dont know is this a bug but when I use COPY to load data into table sequence of the primary key in this table have always start value = 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 :-)

Browse pgsql-bugs by date

  From Date Subject
Next Message Louise Cofield 2003-11-07 21:43:19 FW: Createdb Problems
Previous Message Reece Hart 2003-11-07 19:37:39 pg_dump function dumped after required for table definition