Re: ERROR: null value in column "id" violates not-null constraint - Mailing list pgsql-sql

From Robert Paulsen
Subject Re: ERROR: null value in column "id" violates not-null constraint
Date
Msg-id 200910101529.15690.robert@paulsenonline.net
Whole thread Raw
In response to Re: ERROR: null value in column "id" violates not-null constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ERROR: null value in column "id" violates not-null constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Saturday 10 October 2009 3:16 pm, Tom Lane wrote:
> Robert Paulsen <robert@paulsenonline.net> 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 backid integer DEFAULT nextval('vault_id_seq'::text) NOT NULL,
That "text" seems odd. Should I change it?


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: null value in column "id" violates not-null constraint
Next
From: Tom Lane
Date:
Subject: Re: ERROR: null value in column "id" violates not-null constraint