Yeah, I know ... we ought to find some way around that, but I dunno what yet ...
My idea, which I tried hacking, but gave up was to do the following:
1. Extend this command:
ALTER SEQUENCE seqname RESTART WITH 17;
to allow:
ALTER SEQUENCE ON table(col) RESTART WITH 17... or ALTER SEQUENCE ON table.col RESTART WITH 17...
2. Overload nextval, curval and setval:
SELECT SETVAL('"schema.table"', 'col', 17, false);
3. Or even create a pg_get_sequence() function:
SELECT SETVAL(pg_get_sequence(schema.table, col), 17);
etc.
Chris
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html