pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vibhor Kumar <vibhor.aim@gmail.com>
To: Jacques Lebrun <jlebrun@cplus.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with serial counters
Date: Sat, 26 Feb 2011 00:17:24 +0530
Message-ID: <E58C1ADD-3B7D-470B-8061-A147387D89B9@gmail.com> (raw)
In-Reply-To: <7AD8C28EFB264E22BB784F83949DF0D2@Cplus.int>
References: <7AD8C28EFB264E22BB784F83949DF0D2@Cplus.int>


On Feb 25, 2011, at 2:39 AM, Jacques Lebrun wrote:
> What can I do to force PostGres to update the internat serial counter when I do an insert with a specified value for the serial?
>  

After inserting the all the Data, use ALTER SEQUENCE Command:
http://www.postgresql.org/docs/8.4/static/sql-altersequence.html

Thanks & Regards,
Vibhor




view thread (3+ messages)  latest in thread

Message-ID: <E58C1ADD-3B7D-470B-8061-A147387D89B9@gmail.com>
Permalink:  ../E58C1ADD-3B7D-470B-8061-A147387D89B9@gmail.com/
Also on:    postgresql.org/message-id/E58C1ADD-3B7D-470B-8061-A147387D89B9@gmail.com

 · 

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: vibhor.aim@gmail.com, jlebrun@cplus.org
  Subject: Re: Problem with serial counters
  In-Reply-To: <E58C1ADD-3B7D-470B-8061-A147387D89B9@gmail.com>

* 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