pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Harpreet Dhaliwal <harpreet.dhaliwal01@gmail.com>
Cc: Tom Allison <tom@tacocat.net>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Duplicate Unique Key constraint error
Date: Thu, 12 Jul 2007 20:58:19 -0400
Message-ID: <20070713005819.GC474@alvh.no-ip.org> (raw)
In-Reply-To: <d86a77ef0707121721k37a78e36n6dbc0fdb0dc97517@mail.gmail.com>
References: <d86a77ef0707092214j2f19d5c0yf1e1a0ea19c06122@mail.gmail.com>
	<469320CA.9080406@shaw.ca>
	<d86a77ef0707101057s3ac6a488l22e17c6486eaf950@mail.gmail.com>
	<d86a77ef0707101122y2e2b4ed6icc1514ea730715f6@mail.gmail.com>
	<5288.1184094554@sss.pgh.pa.us>
	<D985E6C3-0D3F-480E-B8F6-459486A05C55@tacocat.net>
	<d86a77ef0707121721k37a78e36n6dbc0fdb0dc97517@mail.gmail.com>

Harpreet Dhaliwal escribió:
> How can one rollover a sequence back to zero after you delete records from 
> a
> table with one such sequence.
> I see it starting with the last value of the sequence inserted.

You can use setval(), but normally you just leave it alone.  Having
numbers not starting from 0 is not a problem in most cases.

-- 
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
Hi! I'm a .signature virus!
cp me into your .signature file to help me spread!



view thread (10+ messages)

Message-ID: <20070713005819.GC474@alvh.no-ip.org>
Permalink:  ../20070713005819.GC474@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20070713005819.GC474@alvh.no-ip.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: alvherre@commandprompt.com, harpreet.dhaliwal01@gmail.com, tom@tacocat.net, pgsql-general@postgresql.org
  Subject: Re: Duplicate Unique Key constraint error
  In-Reply-To: <20070713005819.GC474@alvh.no-ip.org>
  References: <d86a77ef0707092214j2f19d5c0yf1e1a0ea19c06122@mail.gmail.com> <469320CA.9080406@shaw.ca> <d86a77ef0707101057s3ac6a488l22e17c6486eaf950@mail.gmail.com> <d86a77ef0707101122y2e2b4ed6icc1514ea730715f6@mail.gmail.com> <5288.1184094554@sss.pgh.pa.us> <D985E6C3-0D3F-480E-B8F6-459486A05C55@tacocat.net> <d86a77ef0707121721k37a78e36n6dbc0fdb0dc97517@mail.gmail.com> <20070713005819.GC474@alvh.no-ip.org>

* 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