Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

Next:From: Tom LaneDate: 2009-09-18 20:15:06
Subject: Re: Wrong column default values
Previous:From: Andre RotheDate: 2009-09-18 08:24:32
Subject: Wrong column default values

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group