Re: Validating problem in the isn contrib module

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Validating problem in the isn contrib module
Дата
Msg-id 87ljric0d7.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Validating problem in the isn contrib module  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Список pgsql-hackers
Andreas 'ads' Scherbaum <adsmail@wars-nicht.de> writes:

> So this function is useless. If the syntax is valid, the check is
> already done and is_valid() returns true. If the syntax is invalid, PG
> will raise an error even before this function returns. The invalid
> marker is not checked at all.

This seems pretty clearly explained in the documentation. 
 When you insert invalid numbers in a table using the weak mode, the number will be inserted with the corrected check
digit,but it will be displayed with an exclamation mark (!) at the end, for example 0-11-000322-5!. This invalid marker
canbe checked with the is_valid function and cleared with the make_valid function.
 
 You can also force the insertion of invalid numbers even when not in the weak mode, by appending the ! character at
theend of the number.
 

> This leads back to my initial question: intended behaviour or just a
> bug? And how can one validate an ISBN without raising an error?



--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: [PATCH] Regression test fix for Czech locale
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: Additional DTrace Probes