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 20090306130306.1bdbb2b6@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  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 06 Mar 2009 12:44:31 +0100 Bernd Helmle wrote:

> --On Freitag, März 06, 2009 11:32:14 +0100 Andreas 'ads' Scherbaum
> <adsmail@wars-nicht.de> wrote:
>
> I don't see anything that's not already documented. is_valid() checks the
> presence of the invalid (!) marker only. It looks like the author never
> intended is_valid() to be a "check wether this ISBN is semantically
> correct", this is done by the input routines before.

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 leads back to my initial question: intended behaviour or just a
bug? And how can one validate an ISBN without raising an error?


Bye

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


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Writing values to relation using bytearray ...
Next
From: Greg Stark
Date:
Subject: Re: Writing values to relation using bytearray ...