Re: Wrong column default values - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Wrong column default values
Date
Msg-id alpine.BSO.2.00.0909191442250.29622@leary.csoft.net
Whole thread Raw
In response to Re: Wrong column default values  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wrong column default values  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-jdbc by date:

Previous
From: Andre Rothe
Date:
Subject: Re: Wrong column default values
Next
From: Tom Lane
Date:
Subject: Re: Wrong column default values