Re: Wrong column default values

From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Dave Cramer <pg(at)fastcrypt(dot)com>, Andre Rothe <phosco(at)gmx(dot)de>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Wrong column default values
Date: 2009-09-19 18:45:09
Message-ID: alpine.BSO.2.00.0909191442250.29622@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2009-09-19 18:52:39 Re: Wrong column default values
Previous Message Andre Rothe 2009-09-19 18:07:12 Re: Wrong column default values