empty string casting to typed value

From: sad <sad(at)bankir(dot)ru>
To: pgsql-sql(at)postgresql(dot)org
Subject: empty string casting to typed value
Date: 2004-06-07 06:37:44
Message-ID: 200406071037.44547.sad@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Karel Zak 2004-06-07 07:52:00 Re: Formatting problems with negative intervals, TO_CHAR
Previous Message Willem de Jong 2004-06-07 06:09:32 Re: sum ( time) problem