pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Ben Kassel <kasselb@nswccd.navy.mil>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problem with Auto Increment
Date: Mon, 4 Nov 2002 12:45:28 -0800 (PST)
Message-ID: <20021104124318.I11215-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3DC6BC9B.3C628D23@nswccd.navy.mil>


On Mon, 4 Nov 2002, Ben Kassel wrote:

> When I try to create a new row in this table and do not explicitly
> define a unique value for datadefindex I get the following error
> message:

>  More information : If I DROP the database, recreate it, and enter
> values into the table manually, the autoincrement works on this table.
> It seems that the problem arises after I reload the data into the table
> using the \i command on a file which was created using the pg_dump
> command.

Was that a data only dump that you were reloading? I'd guess that a data
only dump is assuming that you have/will set the sequence's next value
correctly yourself.  You might just try finding the max value and using
setval on the sequence to get the sequence in the right place.






view thread (2+ messages)

Message-ID: <20021104124318.I11215-100000@megazone23.bigpanda.com>
Permalink:  ../20021104124318.I11215-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20021104124318.I11215-100000@megazone23.bigpanda.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: sszabo@megazone23.bigpanda.com, kasselb@nswccd.navy.mil
  Subject: Re: Problem with Auto Increment
  In-Reply-To: <20021104124318.I11215-100000@megazone23.bigpanda.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