I am migrating a DB from Access to postgreSQL and am making quite a few
changes to it including renaming tables, columns, sequences, etc.
I am renaming TBLOLD to TBLNEW and consequently need to rename the
sequence from TBLOLD_ID_SEQ to TBLNEW_ID_SEQ. I also want it to START at
a value just above TBLOLD's last value. To set the start value of the
new sequence I am trying:
CREATE SEQUENCE 'tblnew_id_seq' start nextval('tblold_id_deq')
increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
as well as many variations of the above (including using SELECT to get
the nextval).
Could someone please point me to a solution?
Thanks
--
Ron St.Pierre
Syscor R&D
tel: 250-361-1681
email: rstpierre@syscor.com