Re: Wrong column default values

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Andre Rothe <phosco(at)gmx(dot)de>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Wrong column default values
Date: 2009-09-18 20:07:52
Message-ID: 491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, Sep 18, 2009 at 4:24 AM, Andre Rothe <phosco(at)gmx(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2009-09-18 20:15:06 Re: Wrong column default values
Previous Message Andre Rothe 2009-09-18 08:24:32 Wrong column default values