pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ben K. <bkim@coe.tamu.edu>
To: Pascal Tufenkji <ptufenkji@usj.edu.lb>
Cc: pgsql-admin@postgresql.org
Subject: Re: FW: reset all sequences
Date: Tue, 9 May 2006 09:01:27 -0500 (CDT)
Message-ID: <Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu> (raw)
In-Reply-To: <200605090642.k496gTV8021264@Citrus.usj.edu.lb>
References: <200605090642.k496gTV8021264@Citrus.usj.edu.lb>

> Select setval('mytable_id_seq',1);
> So when I insert a new row the value will be "2" and not "1" as it should be

Select setval('mytable_id_seq',1,false);
http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html


HTH.

Ben K.
Developer
http://benix.tamu.edu



view thread (7+ messages)

Message-ID: <Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu>
Permalink:  ../Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu

 · 

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-admin@postgresql.org
  Cc: bkim@coe.tamu.edu, ptufenkji@usj.edu.lb
  Subject: Re: FW: reset all sequences
  In-Reply-To: <Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu>
  References: <200605090642.k496gTV8021264@Citrus.usj.edu.lb> <Pine.GSO.4.64.0605090859250.4784@coe.tamu.edu>

* 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