Re: Validating problem in the isn contrib module

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 12:03:06
Message-ID: 20090306130306.1bdbb2b6@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)wars-nicht(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2009-03-06 12:07:57 Re: Writing values to relation using bytearray ...
Previous Message Greg Stark 2009-03-06 12:01:26 Re: Writing values to relation using bytearray ...