From: Thomas Markus <t.markus@proventis.net>
To: pgsql-admin@postgresql.org
Subject: Re: Sequence update function?
Date: Tue, 12 Jun 2007 08:31:08 +0200
Message-ID: <466E3DAC.10209@proventis.net> (raw)
In-Reply-To: <200706111825.56480.uwe@oss4u.com>
References: <200706111825.56480.uwe@oss4u.com>
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?
>
Attachments:t.markus.vcf (text/x-vcard, 253B) download
begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.markus@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: t.markus@proventis.net
Subject: Re: Sequence update function?
In-Reply-To: <466E3DAC.10209@proventis.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox