"Brian O'Donoghue" <[EMAIL PROTECTED]> writes:
> I was thinking something along the lines of
> ALTER TABLE blah ADD COLUMN whatever integer not null default 1;
> should work,
It should, we just haven't got round to implementing that combination
yet.
regards, tom lane
"Brian O'Donoghue" <[EMAIL PROTECTED]> writes:
> ALTER TABLE blah ADD COLUMN whatever integer not null;
> Adding NOT NULL columns is not implemented.
> Add the column, then use ALTER TABLE ... SET NOT NULL.
> Hmm, the last time I checked, this should have worked.
Although 7.1 allowed that
Ah yes.
ALTER TABLE blah ADD COLUMN whatever integer;
UPDATE blah set whatever=1;
ALTER TABLE blah ALTER COLUMN whatever SET NOT NULL;
Produces the desired effect.
I was thinking something along the lines of
ALTER TABLE blah ADD COLUMN whatever integer not null default 1;
should work, but the
On Mon, 2003-06-16 at 07:53, Brian O'Donoghue wrote:
> I'm running two different strains of PostgreSQL
>
> 7.1.3, which is what our website is running off of now and 7.3.3, which we
> hope to move to (sometime).
>
> In 7.1.3 I can say
>
> ALTER TABLE blah ADD COLUMN whatever integer not null;
C
I'm running two different strains of PostgreSQL
7.1.3, which is what our website is running off of now and 7.3.3, which we
hope to move to (sometime).
In 7.1.3 I can say
ALTER TABLE blah ADD COLUMN whatever integer not null;
and as expected, that works fine
on 7.3.3
the same command returns
A