Re: Wrong default values of columns - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Wrong default values of columns
Date
Msg-id 25161.1253209882@sss.pgh.pa.us
Whole thread Raw
In response to Re: Wrong default values of columns  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Sep 17, 2009 at 10:44 AM, Andre Rothe <phosco@gmx.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

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Wrong default values of columns
Next
From: Joseph Shraibman
Date:
Subject: Re: BUG #5058: [jdbc] Silent failure with executeUpdate()