COPY and sequences

From: Przemysław <przemyslaw(dot)slupkowski(at)euro(dot)coig(dot)pl>
To: pgsql-bugs(at)postgresql(dot)org
Subject: COPY and sequences
Date: 2003-11-07 22:46:21
Message-ID: web-248384@coig.katowice.pl
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 :-)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Berkus 2003-11-07 23:53:22 Minor bug: Odd feedback on STDERR from PSQL for block comments
Previous Message Reece Hart 2003-11-07 22:39:55 pg_dump function dumped after required for table definition