alter table question for 7.2

From: Matthias Leopold <matthias(at)aic(dot)at>
To: pgsql-novice(at)postgresql(dot)org
Subject: alter table question for 7.2
Date: 2009-03-24 17:21:36
Message-ID: 49C916A0.5070006@aic.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi,

can anyone tell me the right way to do something like

alter table foo add column bar int not null default '0';

in a postgresql 7.2 database?

all i managed to do was to add the column and alter it to have "default
'0'".
neither where the fields filled with "0" (like they are when i do this
in postgresql 8.1) nor did i manage to add the "not null" constraint.

thx for help
matthias

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Kretschmer 2009-03-24 17:54:56 Re: alter table question for 7.2
Previous Message Alan Hodgson 2009-03-24 17:17:33 Re: Question on returning Rows in a stored proc