On Fri, 18 Sep 2009, Tom Lane wrote:
> Indeed. In 8.3 it seems that even if you try to set the default that
> way, the system will throw away the cast:
That's only true without a typmod. Consider:
CREATE TEMP TABLE tt (a varchar default null, b varchar(10) default null,
c timestamptz default null, d timestamptz(4) default null);
\d tt
Column | Type | Modifiers
--------+-----------------------------+----------------------------------------
a | character varying |
b | character varying(10) | default NULL::character varying
c | timestamp with time zone |
d | timestamp(4) with time zone | default NULL::timestamp with time
zone
Kris Jurka