pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Cramer <pg@fastcrypt.com>
To: Andre Rothe <phosco@gmx.de>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Wrong column default values
Date: Fri, 18 Sep 2009 16:07:52 -0400
Message-ID: <491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com> (raw)
In-Reply-To: <db420c9c-2345-4c06-add7-10ea404e4008@g6g2000vbr.googlegroups.com>
References: <db420c9c-2345-4c06-add7-10ea404e4008@g6g2000vbr.googlegroups.com>

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

view thread (9+ messages)  latest in thread

Message-ID: <491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com>
Permalink:  ../491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com/
Also on:    postgresql.org/message-id/491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg@fastcrypt.com, phosco@gmx.de
  Subject: Re: Wrong column default values
  In-Reply-To: <491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com>
  References: <db420c9c-2345-4c06-add7-10ea404e4008@g6g2000vbr.googlegroups.com> <491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox