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

From Dave Cramer
Subject Re: Wrong column default values
Date
Msg-id 491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com
Whole thread Raw
In response to Wrong column default values  (Andre Rothe <phosco@gmx.de>)
Responses Re: Wrong column default values  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc


On Fri, Sep 18, 2009 at 4:24 AM, Andre Rothe <phosco@gmx.de> wrote:
Hi,

I have installed Postgres 8.3.8 on Fedora Linux and I access it per
JDBC (PostgreSQL 8.1 JDBC3 with SSL (build 407)). If I create a table,
the default values will be set by the database to

NULL::timestamp without time zone

for a timezone column and to

NULL::character varying

for a varchar column. How I can prevent such a behaviour? Both column
defaults should be NULL. Any ideas?

How do you create this table ? To answer your question, just add default null to the definition of the column.

Dave

pgsql-jdbc by date:

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