Re: Validating problem in the isn contrib module - Mailing list pgsql-hackers

From Andreas 'ads' Scherbaum
Subject Re: Validating problem in the isn contrib module
Date
Msg-id 20090306113214.0d7ba1e1@iridium.wars-nicht.de
Whole thread Raw
In response to Re: Validating problem in the isn contrib module  (Bernd Helmle <mailings@oopsware.de>)
Responses 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>)
List 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 by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1668)
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Validating problem in the isn contrib module