Austin Swinney <austin(at)interactivate(dot)com> writes:
> 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
In response to
pgsql-novice by date
|Next:||From: Steve Tucknott||Date: 2004-07-30 12:35:56|
|Subject: Significant spaces|
|Previous:||From: Austin Swinney||Date: 2004-07-29 21:21:59|
|Subject: catching up an id sequence|