Received: from mail-b.bcc.ac.uk (mail-b.bcc.ac.uk [144.82.100.22]) by hub.org (8.8.8/8.7.5) with ESMTP id MAA22211 for ; Mon, 13 Jul 1998 12:55:00 -0400 (EDT) Received: from kestrel.ludwig.ucl.ac.uk by mail-b.bcc.ac.uk with SMTP (XT-PP); Mon, 13 Jul 1998 17:54:35 +0100 Received: from [128.40.242.190] (lud190) by kestrel.ludwig.ucl.ac.uk (4.1/SMI-4.1) id AA27099; Mon, 13 Jul 1998 17:58:39 BST X-Sender: stuart@kestrel.ludwig.ucl.ac.uk Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 13 Jul 1998 17:30:16 +0100 To: pgsql-sql@postgresql.org From: Stuart Rison Subject: Re: [SQL] empty data Cc: serbr@tin.it >> serbr=> CREATE TABLE foo (mtdata date); >> CREATE >> serbr=> \dt >> >> Database = serbr >> +------------------+----------------------------------+----------+ >> | Owner | Relation | Type | >> +------------------+----------------------------------+----------+ >> | serbr | foo | table | >> +------------------+----------------------------------+----------+ >> serbr=> INSERT INTO foo VALUES (''); >> ERROR: Bad date external representation >> serbr=> INSERT INTO foo VALUES ('//'); >> ERROR: Bad date external representation > > My problem arise in a more general context, where the date may not > be available at the time of data insert/update, and the data must > be empty. > > What can I do? (I would not like to define a my own date-type...) Try insert into foo values (NULL); Naturally, this is silly in the example you give since you are putting a NULL in a single field table and therefore you might as well not put a value in. Hope this helps. Stuart. +-------------------------+--------------------------------------+ | Stuart Rison | Ludwig Institute for Cancer Research | +-------------------------+ University College London | | Tel. (0171) 878 4041 | 91 Riding House Street | | Fax. (0171) 878 4040 | London, W1P 8BT, UNITED KINGDOM. | +-------------------------+--------------------------------------+ | stuart@NOJUNK_ludwig.ucl.ac.uk [Remove NOJUNK_ for it to work] | +----------------------------------------------------------------+