pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stuart Rison <stuart@ludwig.ucl.ac.uk>
To: pgsql-sql@postgresql.org
Cc: serbr@tin.it
Subject: Re: [SQL] empty data
Date: Mon, 13 Jul 1998 17:30:16 +0100
Message-ID: <l03110703b1cfe57701a2@[128.40.242.190]> (raw)

>> 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] |
+----------------------------------------------------------------+





view thread (3+ messages)  latest in thread

Message-ID: <l03110703b1cfe57701a2@[128.40.242.190]>
Permalink:  ../l03110703b1cfe57701a2@%5B128.40.242.190%5D/
Also on:    postgresql.org/message-id/l03110703b1cfe57701a2@[128.40.242.190]

 · 

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-sql@postgresql.org
  Cc: stuart@ludwig.ucl.ac.uk, serbr@tin.it
  Subject: Re: [SQL] empty data
  In-Reply-To: <l03110703b1cfe57701a2@[128.40.242.190]>
  References: <l03110703b1cfe57701a2@[128.40.242.190]>

* 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