Re: BUG #1290: Default value and ALTER...TYPE - Mailing list pgsql-bugs

From Troels Arvin
Subject Re: BUG #1290: Default value and ALTER...TYPE
Date
Msg-id pan.2004.10.20.18.29.11.985947@arvin.dk
Whole thread Raw
In response to BUG #1290: Default value and ALTER...TYPE  ("PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>)
Responses Re: BUG #1290: Default value and ALTER...TYPE
Bug in pgAdminIII or in pg 8 beta3 ?
List pgsql-bugs
On Wed, 20 Oct 2004 14:07:29 -0400, Tom Lane wrote:

> Hmm.  What's going on here is that the stored default expression is
> actually of the form
>     ('TODO'::varchar)::varchar(2)

Would it be possible to check the compatibility of a default value for
the associated column? Such a check might probably have to be limited to
checking of scalar default values - not function calls - to make it
doable.
This would be nice anyway, to catch stupid CREATE TABLE errors earlier.

If such a compatibility check could somehow be implemented, then the check
could be applied for

 - CREATE TABLE ...
 - ALTER TABLE ... ALTER COLUMN ... SET DEFAULT...
 - ALTER TABLE ... ALTER COLUMN ... TYPE...
 - CREATE DOMAIN ...

--
Greetings from Troels Arvin, Copenhagen, Denmark

pgsql-bugs by date:

Previous
From: Rod Taylor
Date:
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] BUG #1290: Default value and ALTER...TYPE