Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id AA404475881 for ; Wed, 17 Apr 2002 11:25:54 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g3HFPZF06672; Wed, 17 Apr 2002 11:25:35 -0400 (EDT) To: "Matteo Beccati" Cc: pgsql-sql@postgresql.org Subject: Re: How to reset sequences on pre-7.1 In-reply-to: <2780D698C269CB4EB303715BA48B6A104D35@sole.CRP> References: <2780D698C269CB4EB303715BA48B6A104D35@sole.CRP> Comments: In-reply-to "Matteo Beccati" message dated "Wed, 17 Apr 2002 14:44:01 +0200" Date: Wed, 17 Apr 2002 11:25:35 -0400 Message-ID: <6669.1019057135@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/213 X-Sequence-Number: 7477 "Matteo Beccati" writes: > I usually use a: > SELECT setval('seq_name', NULL); > to reset sequences, so the next time it's called it returns '1'. This > works in all Pg releases I've ever tested but 7.0. On all recent releases, that is a complete no-op, because setval() is a strict function. Better check what you were actually doing. regards, tom lane