| From: | Guido Piazzi <gpiazzi(at)nemo(dot)it> |
|---|---|
| To: | Sergio Brandano <serbr(at)tin(dot)it> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: [SQL] empty data |
| Date: | 1998-07-13 17:26:09 |
| Message-ID: | Pine.LNX.3.96.980713191427.214A-100000@ik2gdx.ampr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)nemo(dot)it Visitate il sito WWW.ParcoDelTicino.Pmn.It
------------------------------------------------------------------------
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 1998-07-13 19:21:47 | Conversion from Unix timestamp to datetime? |
| Previous Message | Stuart Rison | 1998-07-13 16:30:16 | Re: [SQL] empty data |