Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6E222475BC3 for ; Mon, 4 Nov 2002 15:45:28 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id CFAAB475A3F for ; Mon, 4 Nov 2002 15:45:27 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id B97A7D61E; Mon, 4 Nov 2002 12:45:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id AB2AC5C02; Mon, 4 Nov 2002 12:45:28 -0800 (PST) Date: Mon, 4 Nov 2002 12:45:28 -0800 (PST) From: Stephan Szabo To: Ben Kassel Cc: Subject: Re: Problem with Auto Increment In-Reply-To: <3DC6BC9B.3C628D23@nswccd.navy.mil> Message-ID: <20021104124318.I11215-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/46 X-Sequence-Number: 10188 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.