Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 

Kris Jurka

In response to


pgsql-jdbc by date

Next:From: Tom LaneDate: 2009-09-19 18:52:39
Subject: Re: Wrong column default values
Previous:From: Andre RotheDate: 2009-09-19 18:07:12
Subject: Re: Wrong column default values

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group