pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matteo Beccati <m.beccati@crpsoftware.it>
To: pgsql-sql@postgresql.org
Subject: How to reset sequences on pre-7.1
Date: Wed, 17 Apr 2002 14:44:01 +0200
Message-ID: <2780D698C269CB4EB303715BA48B6A104D35@sole.CRP> (raw)

Hi,

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 an hosted space that still has a 7.0 release candidate, this query
fails, telling me that I cannot use a 0 value.

Anybody knows how to reset sequences in this case?

Regards
--
Matteo Beccati
http://www.phpadsnew.com
http://phppgads.sourceforge.net




view thread (2+ messages)  latest in thread

Message-ID: <2780D698C269CB4EB303715BA48B6A104D35@sole.CRP>
Permalink:  ../2780D698C269CB4EB303715BA48B6A104D35@sole.CRP/
Also on:    postgresql.org/message-id/2780D698C269CB4EB303715BA48B6A104D35@sole.CRP

 · 

reply

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-sql@postgresql.org
  Cc: m.beccati@crpsoftware.it
  Subject: Re: How to reset sequences on pre-7.1
  In-Reply-To: <2780D698C269CB4EB303715BA48B6A104D35@sole.CRP>

* 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