From: | Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Validating problem in the isn contrib module |
Date: | 2009-03-06 10:32:14 |
Message-ID: | 20090306113214.0d7ba1e1@iridium.wars-nicht.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)wars-nicht(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas 'ads' Scherbaum | 2009-03-06 10:32:46 | Re: Validating problem in the isn contrib module |
Previous Message | Heikki Linnakangas | 2009-03-06 10:25:13 | Re: Updates of SE-PostgreSQL 8.4devel patches (r1668) |