Re: Question about NOT NULL and default values.

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Tim Uckun" <timuckun(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about NOT NULL and default values.
Date: 2008-10-17 03:40:08
Message-ID: dcc563d10810162040k69118697nd58e95dee00b82fe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <timuckun(at)gmail(dot)com> wrote:
> Hey all.
>
> I am using postgres 8.3 with a rails application. I have a column
> defined like this.
>
> ALTER TABLE provisions ADD COLUMN provider_id integer;
> ALTER TABLE provisions ALTER COLUMN provider_id SET STORAGE PLAIN;
> ALTER TABLE provisions ALTER COLUMN provider_id SET NOT NULL;
> ALTER TABLE provisions ALTER COLUMN provider_id SET DEFAULT 0;

Hold on, when did you assign a sequence to this column? When you
created it as a serial? Or is there none assigned?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2008-10-17 03:42:49 Re: Question about fulltext search and to_tsvector function
Previous Message Tom Lane 2008-10-17 03:37:25 Re: Question about fulltext search and to_tsvector function