From: | Evelio Martinez <evelio(dot)martinez(at)testanet(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Bug with serial columns |
Date: | 2001-01-31 10:56:40 |
Message-ID: | 3A77EF68.22315E31@testanet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi!
If I execute "psql database < file.sql"
where file.sql contents are as follow below.
last_value it does not get update after inserts.
I have several options :
CREATE SEQUENCE START 9 or
SELECT SETVAL('fam_idfam_seq', 9);
Why if I execute the sentences directly from psql it works ok?
It seems to be a bug, doesn't it ?
CREATE TABLE fam (
idfam serial,
nombre varchar(60) not null,
descrip text,
PRIMARY KEY (idfam)
);
INSERT INTO fam (idfam,nombre) VALUES ( 1, 'TEM' );
INSERT INTO fam (idfam,nombre) VALUES ( 2, 'ESC' );
INSERT INTO fam (idfam,nombre) VALUES ( 3, 'EXP');
INSERT INTO fam (idfam,nombre) VALUES ( 4, 'STA');
INSERT INTO fam (idfam,nombre) VALUES ( 5, 'AME');
INSERT INTO fam (idfam,nombre) VALUES ( 6, 'VOL);
INSERT INTO fam (idfam,nombre) VALUES ( 7, 'FAL');
INSERT INTO fam (idfam,nombre) VALUES ( 8, 'CAR');
INSERT INTO fam (idfam,nombre) VALUES ( 9, 'ELE');
--
Evelio Martínez
Testanet. Dept. desarrollo software.
Av. Reino de Valencia, 15 - 5
46005 Valencia (Spain)
Tel: +34 96 395 90 00
Fax: +34 96 316 23 19
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fork | 2001-01-31 12:46:43 | Re: Bug with serial columns |
Previous Message | Craig Orsinger | 2001-01-31 09:25:40 | Re: Write to postgreSQL via ODBC? |