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

From Bernd Helmle
Subject Re: Validating problem in the isn contrib module
Date
Msg-id C12AE0A2A752416C79F3EE81@teje
Whole thread Raw
In response to Validating problem in the isn contrib module  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
Responses Re: Validating problem in the isn contrib module
List pgsql-hackers
--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:


#= SELECT isn_weak(true);isn_weak
----------t

#= SELECT is_valid('978-3-937514-69-6'::isbn13);is_valid
----------f

#= SELECT is_valid('978-3-937514-69-7'::isbn13);is_valid
----------t

--  Thanks
                   Bernd


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: Additional DTrace Probes
Next
From: Kedar Potdar
Date:
Subject: Writing values to relation using bytearray ...