implicit cast of empty string to timestamp

From: "James Harper" <james(dot)harper(at)bendigoit(dot)com(dot)au>
To: <pgsql-general(at)postgresql(dot)org>
Subject: implicit cast of empty string to timestamp
Date: 2006-02-10 09:22:57
Message-ID: AEC6C66638C05B468B556EA548C1A77DAF0811@trantor
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there anything I can do to make postgres allow an implicit cast of an
empty string to a timestamp, so that a badly behaved application can do:

INSERT INTO SomeTable (timestampfield) VALUES ('')

Where timestampfield is of type typestamp. ?

From what I understand of the 'CREATE CAST' command, I can't just create
a cast that only kicks in on empty strings whilst leaving casts of other
strings as is...

Thanks

James

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-02-10 09:36:46 Re: implicit cast of empty string to timestamp
Previous Message A. Kretschmer 2006-02-10 08:41:50 Re: How to use pg_stat_activity correctly ?