Skip site navigation (1) Skip section navigation (2)

Re: Alter table add column ignores default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: Nabil Sayegh <nsmail(at)sayegh(dot)de>, vev(at)hub(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Alter table add column ignores default
Date: 2001-05-11 13:47:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Vince Vielhaber <vev(at)michvhf(dot)com> writes:
> If this:
> alter table foobar add column address varchar(50) default 'none';
> is the incorrect syntax, why does it not fail or at least give a
> warning?

Because it's incompletely implemented: the parser takes the full syntax
but the ALTER TABLE routine doesn't do everything it should.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-05-11 13:57:41
Subject: Re: SELECT updatability clause defective.
Previous:From: Thomas LockhartDate: 2001-05-11 13:45:37
Subject: Re: createdb test shown as number in data directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group