Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BD1F26339CB for ; Sat, 10 Oct 2009 17:29:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23044-03 for ; Sat, 10 Oct 2009 20:29:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.ecpi.com (mail.ecpi.com [64.128.16.3]) by mail.postgresql.org (Postfix) with ESMTP id 8C96A6332FF for ; Sat, 10 Oct 2009 17:29:18 -0300 (ADT) Received: (qmail 32422 invoked by uid 89); 10 Oct 2009 20:29:03 -0000 Received: from unknown (HELO paulsen.homeip.net) (64.128.19.172) by mail4.ecpi.com with SMTP; 10 Oct 2009 20:29:03 -0000 Received: by paulsen.homeip.net (Postfix, from userid 1000) id D282211CB11; Sat, 10 Oct 2009 15:29:15 -0500 (CDT) From: Robert Paulsen To: Tom Lane Subject: Re: ERROR: null value in column "id" violates not-null constraint Date: Sat, 10 Oct 2009 15:29:15 -0500 User-Agent: KMail/1.9.1 Cc: pgsql-sql@postgresql.org References: <200910101056.24051.robert@paulsenonline.net> <200910101405.26853.robert@paulsenonline.net> <20765.1255205790@sss.pgh.pa.us> In-Reply-To: <20765.1255205790@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910101529.15690.robert@paulsenonline.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/46 X-Sequence-Number: 33245 On Saturday 10 October 2009 3:16 pm, Tom Lane wrote: > Robert Paulsen writes: > > On Saturday 10 October 2009 2:00 pm, Robert Paulsen wrote: > >> So no default for id. What should it be? > >> default nextval('vault_id_seq') > > > > Should have tried that before posting last message -- it worked. Thanks! > > So the next question is just what happened and whether you're missing > anything else from the original database state ... > > regards, tom lane Well, there was one other table with a sequence as a primary key and that was lost also. Otherwise nothing else was wrong. I went through a dump/restore cycle after fixing things and it all worked. I do have a question, though, I fixed things as indicated above: id integer DEFAULT nextval('vault_id_seq') NOT NULL, Dump gave back id integer DEFAULT nextval('vault_id_seq'::text) NOT NULL, That "text" seems odd. Should I change it?