On Mon, Jun 07, 2004 at 10:37:44 +0400, sad <sad@bankir.ru> wrote:
> Hello
>
> It is clear that '' is a bad integer or timestamp representation
>
> but during the user input NULLs are usually represented with empty strings
> sometimes bunch of 'if empty' instructions grows huge
> (and in case of casting to timestamp apostrophes make sense)
An empty string is not an obvious particular time. Different applications
might treat this differently. Not applicable, missing, and current time
are all reasonable defaults.
>
> Why you prohibit casting ''::int to NULL ?
> What would you advice ?
The application should handle mapping appropiate inputs to NULL or perhaps
DEFAULT.