how to reset the sequences of SERIAL vars?

From: Bruno Boettcher <bboett(at)bboett(dot)dyndns(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: how to reset the sequences of SERIAL vars?
Date: 2002-11-01 09:59:11
Message-ID: 20021101095911.GG22302@bboett.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
its a FAQ i know, but i couldn't find it on the site or the docu...
this problem arises mainly after a backup was played in again....

when inserting from backup the tables are filled with all fields, this
means alos those defined as serial, but without using nextval...

this means that the sequences for those vars are out of synch with the
table after the backup...

now there was a sequence to set this up and runnign again, but i cna't
find it in my papers anymore, so if someone could kindly point me out
on how to set up the correct values un the sequence i will be really
grateful.

--
ciao bboett
==============================================================
bboett(at)adlp(dot)org
http://inforezo.u-strasbg.fr/~bboett
===============================================================

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-11-01 10:11:53 Re: how to reset the sequences of SERIAL vars?
Previous Message Devrim GÜNDÜZ 2002-11-01 09:35:19 pam_pgsql, Postfix, imap and PostgreSQL