Re: Sequence update function?

From: Thomas Markus <t(dot)markus(at)proventis(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Sequence update function?
Date: 2007-06-12 06:31:08
Message-ID: 466E3DAC.10209@proventis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

do a

select setval('sequence',max(col)+1) from tablename

for each table

tm

Uwe C. Schroeder schrieb:
> Hi,
>
> just thought I ask before I start doing it myself: Has anyone ever written a
> stored procedure (or any other means) of syncing the sequence to the max #
> key in the corresponding tables?
>

Attachment Content-Type Size
t.markus.vcf text/x-vcard 255 bytes

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jayakumar_Mukundaraju 2007-06-12 08:34:18 Postgresql - Windows platform
Previous Message John DeSoi 2007-06-12 04:22:24 Re: problems installing postgresql 8.0 on Mac OS