empty string casting to typed value

Поиск
Список
Период
Сортировка
От sad
Тема empty string casting to typed value
Дата
Msg-id 200406071037.44547.sad@bankir.ru
обсуждение исходный текст
Ответы Re: empty string casting to typed value
Re: empty string casting to typed value
Список 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 по дате отправления:

Предыдущее
От: Khairul Azmi
Дата:
Сообщение: Re: ERROR: duplicate key violates unique constraint (SOLVED)
Следующее
От: Karel Zak
Дата:
Сообщение: Re: Formatting problems with negative intervals, TO_CHAR