implicit cast of empty string to timestamp - Mailing list pgsql-general

From James Harper
Subject implicit cast of empty string to timestamp
Date
Msg-id AEC6C66638C05B468B556EA548C1A77DAF0811@trantor
Whole thread Raw
Responses Re: implicit cast of empty string to timestamp  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List 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

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: How to use pg_stat_activity correctly ?
Next
From: "A. Kretschmer"
Date:
Subject: Re: implicit cast of empty string to timestamp