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

From Andre Rothe
Subject Re: Wrong column default values
Date
Msg-id 2426021f-e049-40e1-910b-ff92c345135b@p23g2000vbl.googlegroups.com
Whole thread Raw
In response to Wrong column default values  (Andre Rothe <phosco@gmx.de>)
Responses Re: Wrong column default values  (Kris Jurka <books@ejurka.com>)
List 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...@fastcrypt.com (Dave Cramer) wrote:
> How do you create this table ? To answer your question, just add default
> null to the definition of the column.

pgsql-jdbc by date:

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