Re: Validating problem in the isn contrib module

Поиск
Список
Период
Сортировка
От Andreas 'ads' Scherbaum
Тема Re: Validating problem in the isn contrib module
Дата
Msg-id 20090306113214.0d7ba1e1@iridium.wars-nicht.de
обсуждение исходный текст
Ответ на Re: Validating problem in the isn contrib module  (Bernd Helmle <mailings@oopsware.de>)
Ответы Re: Validating problem in the isn contrib module  (Gregory Stark <stark@enterprisedb.com>)
Re: Validating problem in the isn contrib module  (Bernd Helmle <mailings@oopsware.de>)
Список pgsql-hackers
On Fri, 06 Mar 2009 00:32:40 +0100 Bernd Helmle wrote:

> --On Freitag, März 06, 2009 02:26:12 +0100 Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>
> > test=# select is_valid('978-3-937514-69-6'::isbn13);
> > ERROR:  invalid check digit for ISBN number: "978-3-937514-69-6",
> > should be 7 ROW 1: select is_valid('978-3-937514-69-6'::isbn13);
>
> According to the docs, this is intended behavior. If you want to validate
> those values later or yourself, you have to use the weak mode:

No.
Straight from the source:

-- isn_weak(boolean) - Sets the weak input mode.
-- This function is intended for testing use only!


The validator function should use the weak mode for itself to return
'f' in case of invalid input. It cannot be the users job to make sure a
validator function is working as expected.


Bye

--             Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1668)
Следующее
От: Andreas 'ads' Scherbaum
Дата:
Сообщение: Re: Validating problem in the isn contrib module