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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster