| От | Tom Lane |
|---|---|
| Тема | Re: Bad (null) varchar() external representation |
| Дата | |
| Msg-id | 12169.979239194@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Bad (null) varchar() external representation (Justin Clift <aa2@bigpond.net.au>) |
| Список | pgsql-sql |
Justin Clift <aa2@bigpond.net.au> writes:
> "Bad (null) varchar() external representation"
This is a known stupidity in 7.0.* and before: length(varchar) doesn't
like NULLs:
play=> select length(null::varchar);
ERROR: Bad (null) varchar() external representation
It's fixed for 7.1. If it's really bothering you in 7.0.*, find that
error string in src/backend/utils/adt/varchar.c and change the code to
return 0 instead of raising an error for NULL input.
But, as someone else pointed out, the constraint expressions you are
using are redundant anyway, given the declared column length limits.
Getting rid of the constraints might be your easiest workaround for now.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера