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