empty string casting to typed value - Mailing list pgsql-sql

From sad
Subject empty string casting to typed value
Date
Msg-id 200406071037.44547.sad@bankir.ru
Whole thread Raw
Responses Re: empty string casting to typed value
Re: empty string casting to typed value
List pgsql-sql
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)

Why you prohibit casting ''::int  to NULL ?
What would you advice ?

thnx






pgsql-sql by date:

Previous
From: Khairul Azmi
Date:
Subject: Re: ERROR: duplicate key violates unique constraint (SOLVED)
Next
From: Karel Zak
Date:
Subject: Re: Formatting problems with negative intervals, TO_CHAR