Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 921566361B2 for ; Fri, 18 Sep 2009 17:08:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25535-05 for ; Fri, 18 Sep 2009 20:08:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f204.google.com (mail-qy0-f204.google.com [209.85.221.204]) by mail.postgresql.org (Postfix) with ESMTP id 3035A63634C for ; Fri, 18 Sep 2009 17:07:54 -0300 (ADT) Received: by qyk42 with SMTP id 42so1052151qyk.28 for ; Fri, 18 Sep 2009 13:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=ylo9KPAfzwYT2eQHwbFsXAO/EBiCjIjLCdsAMG1igZA=; b=IbC22JNFHS2hgqmNnfMO9T4eXNFnmd3i6hpKDTNmo6eLB7asMIi4TqK9RTmrpIsjjE sQPNFqDQpFnP1CtJblDbHh/bDFnK+BGouk8lU+0SNNiS5iik61iM9SjJ1ZdV6PhkT3Hp 2VAUWfBAZuJIbj3r3p8UQJsdHv9XMgx9pLV5c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=sJ/j+JdgkZQ5sR6RayfaooFWp2aM2Sgjb9doxsvwqEnBfG0U17PQQLIQfgu1gG30ED hDRReJKyVF4whZIkNrXwhFLtegsWaX5nl3BmY7Qiwin3XaWoW9LBqh/Paa4rOEla5T45 DW8vXFzXPOxPHxQGz8/oZpSPPVotr+HgSzvhU= MIME-Version: 1.0 Received: by 10.229.29.148 with SMTP id q20mr615481qcc.51.1253304472794; Fri, 18 Sep 2009 13:07:52 -0700 (PDT) In-Reply-To: References: Date: Fri, 18 Sep 2009 16:07:52 -0400 X-Google-Sender-Auth: c94cce5a27ca3043 Message-ID: <491f66a50909181307q147e92b4g58a6d5ef47cc0518@mail.gmail.com> Subject: Re: Wrong column default values From: Dave Cramer To: Andre Rothe Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=001636833dfce577a30473dfafbe X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200909/28 X-Sequence-Number: 19975 --001636833dfce577a30473dfafbe Content-Type: text/plain; charset=ISO-8859-1 On Fri, Sep 18, 2009 at 4:24 AM, Andre Rothe 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 --001636833dfce577a30473dfafbe Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable