From: Dmitriy Igrishin <dmitigr@gmail.com>
To: Robert Paulsen <robert@paulsenonline.net>
Cc: pgsql-sql@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: ERROR: null value in column "id" violates not-null constraint
Date: Sun, 11 Oct 2009 12:32:05 +0400
Message-ID: <b4399d110910110132q58e7f211v9ba204cb47239d3c@mail.gmail.com> (raw)
In-Reply-To: <200910101736.46449.robert@paulsenonline.net>
References: <200910101056.24051.robert@paulsenonline.net>
<200910101529.15690.robert@paulsenonline.net>
<22204.1255209151@sss.pgh.pa.us>
<200910101736.46449.robert@paulsenonline.net>
Hello.
Note, that you may use SERIAL data type and PostgreSQL will implicitly
create sequence for you column, for example,
CREATE table test (
id SERIAL NOT NULL PRIMARY KEY, -- PostgreSQL will implicitly create
'test_id_seq'
dat text
);
Regards,
Dmitiy Igrishin
2009/10/11 Robert Paulsen <robert@paulsenonline.net>
> On Saturday 10 October 2009 4:12 pm, Tom Lane wrote:
> > Robert Paulsen <robert@paulsenonline.net> writes:
> > > 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?
> >
> > That's all there is in 8.0 ...
> >
> > regards, tom lane
>
> Thanks!
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
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: dmitigr@gmail.com, robert@paulsenonline.net, tgl@sss.pgh.pa.us
Subject: Re: ERROR: null value in column "id" violates not-null constraint
In-Reply-To: <b4399d110910110132q58e7f211v9ba204cb47239d3c@mail.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