From: | "Gregory Wood" <gregw(at)com-stock(dot)com> |
---|---|
To: | "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Re: ALTER TABLE ADD CONSTRAINT |
Date: | 2001-05-11 20:30:52 |
Message-ID: | 010101c0da59$6eb1e270$7889ffcc@comstock.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> >> Also, I see that alter table add constraint does not work for defaults.
> >>
> >> Is this something that is going to be added?
> >
> > That I do hope will be added since the only way to replicate the
> > functionality is to drop, readd and repopulate a table.
> >
> > Greg
>
> I am not sure specifically what you are looking for but you can add a
> default value to a column in an ALTER TABLE statement:
>
> ALTER TABLE two ALTER COLUMN col_b SET DEFAULT 1;
Sorry, I was assuming the original author was correct in his statement. I
thought there was some limitation here though... maybe it was dropping the
default that I was thinking of.
> The biggest thing that I have noticed is many things require you to use
> separate ALTER statements in order for them to work.
That's what I was pointing out :)
Greg
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Wood | 2001-05-11 20:31:59 | Re: VACUUM notices |
Previous Message | Philip Crotwell | 2001-05-11 20:30:48 | Re: defunct postmasters |