Search Postgresql Archives

Re: Question about NOT NULL and default values.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 17, 2008 at 4:40 PM, Scott Marlowe <scott.marlowe@xxxxxxxxx> wrote:
> On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <timuckun@xxxxxxxxx> 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?
>

There is no sequence.  It's a foreign key.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux