Re: [SQL] empty data - Mailing list pgsql-sql

From Guido Piazzi
Subject Re: [SQL] empty data
Date
Msg-id Pine.LNX.3.96.980713191427.214A-100000@ik2gdx.ampr.org
Whole thread Raw
In response to [SQL] empty data  (Sergio Brandano <serbr@tin.it>)
List pgsql-sql
On Mon, 13 Jul 1998, Sergio Brandano wrote:

> > serbr=> CREATE TABLE foo (mtdata date);
> > CREATE
> > serbr=> INSERT INTO foo VALUES ('');
> > ERROR:  Bad date external representation

guido=> INSERT INTO foo VALUES (null);
INSERT 144906 1

Postgres doesn't like empty strings for date fields.
When using the COPY command (for loading data from a file)
null date fields should contain \N (backslash, capital N).

regards,

------------------------------------------------------------------------
// Guido Carlo Piazzi                       Accompagnatore naturalistico
// gpiazzi@nemo.it            Visitate il sito WWW.ParcoDelTicino.Pmn.It
------------------------------------------------------------------------


pgsql-sql by date:

Previous
From: Stuart Rison
Date:
Subject: Re: [SQL] empty data
Next
From: Tom Lane
Date:
Subject: Conversion from Unix timestamp to datetime?