Re: Wrong default values of columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andre Rothe <phosco(at)gmx(dot)de>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Wrong default values of columns
Date: 2009-09-17 17:51:22
Message-ID: 25161.1253209882@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Sep 17, 2009 at 10:44 AM, Andre Rothe <phosco(at)gmx(dot)de> wrote:
>> The problem is, that I get the default values from a metadata query
>> with JDBC,
>> so I have to parse every return value for such an annotation before I
>> can use them.

> That sounds annoying, but it's not a PostgreSQL bug.

I think the type decoration must be getting injected on the client side,
actually. Postgres won't insert that for itself, not even if you
explicitly say "default null". Pre-8.3, if you say "default
null::varchar" then Postgres will regurgitate it that way (8.3 and up
throw the cast away even in that case). But it had to have come from
the client initially.

So pgsql-jdbc are the folks to talk to.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Joseph Shraibman 2009-09-17 18:27:20 Re: BUG #5058: [jdbc] Silent failure with executeUpdate()
Previous Message Robert Haas 2009-09-17 17:41:32 Re: Wrong default values of columns