From: | "Rod Taylor" <rbt(at)zort(dot)ca> |
---|---|
To: | "Hackers List" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Domains and Casting |
Date: | 2002-06-18 02:42:22 |
Message-ID: | 01b701c21671$c654ffd0$fe01a8c0@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
In order to make domains spec compliant I've added the ability for the
executor to handle Constraint * types, which it applies appropriately.
coerce_type wraps domains with the appropriate Constraint Nodes as
required. I've run into a rather simple problem however.
CREATE DOMAIN int4notnulldomain int4 NOT NULL;
SELECT cast(cast(NULL as int4) as int4notnulldomain); -- constraint
applied properly
SELECT cast(NULL as int4notnulldomain); -- constraint missed.
This appears to be due to makeTypeCast() in gram.y which bypasses
creating a TypeCast node for simple A_Const.
Removing the top part of the if (always creating a TypeCast node)
causes some rather extensive failures in the regression tests,
specifically with 'int4'::regproc type constructs.
Any advice?
--
Rod
From | Date | Subject | |
---|---|---|---|
Next Message | David Ford | 2002-06-18 04:38:27 | Re: PostGres Doubt |
Previous Message | Christopher Kings-Lynne | 2002-06-18 02:29:42 | Re: Massive regression failures |