Re: alter table question for 7.2

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: alter table question for 7.2
Date: 2009-03-24 17:54:56
Message-ID: 20090324175456.GA32674@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Matthias Leopold <matthias(at)aic(dot)at> wrote:

> 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?

Update now!

IIRC, first add the column and then use ALTER TABLE SET DEFAULT.
Try that, i'm not sure, 7.2 is too old.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2009-03-24 18:14:43 Re: alter table question for 7.2
Previous Message Matthias Leopold 2009-03-24 17:21:36 alter table question for 7.2