Re: Wrong column default values

From: Andre Rothe <phosco(at)gmx(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Wrong column default values
Date: 2009-09-19 18:00:01
Message-ID: 2426021f-e049-40e1-910b-ff92c345135b@p23g2000vbl.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I have exlicitly set the default value for every column, but if I ask
the
driver for the current value, it doesn't give me a simple NULL, but
the
described expression. For the moment I have translated the result
with a

private String dropAnnotations(String defValue) {
String res = defValue;
if ((res != null) && (res.contains("::"))) {
res = res.substring(0, res.lastIndexOf("::"));
}
return res;
}

But this is an ugly way to get a clean default value from the driver.

Andre

On Sep 18, 10:07 pm, p(dot)(dot)(dot)(at)fastcrypt(dot)com (Dave Cramer) wrote:
> How do you create this table ? To answer your question, just add default
> null to the definition of the column.

In response to

Responses

Browse pgsql-jdbc by date

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