Austin Swinney <austin (AT) interactivate (DOT) com> writes:
Quote:
Hi most esteemed novices and experts. It is an honor to post here!
I imported a MySQL dump into PostgreSQL (7.4.3) and was wondering what
a good way to catch up the ID sequence table to be current with the
table I imported. |
You want setval(). The usual approach is
select setval('tab_col_seq', (select max(col) from tab) + 1);
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)