Re: Validating problem in the isn contrib module

From: Bernd Helmle <mailings(at)oopsware(dot)de>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Validating problem in the isn contrib module
Date: 2009-03-06 11:44:31
Message-ID: FCC43E475C076688490CFCAB@teje
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Freitag, März 06, 2009 11:32:14 +0100 Andreas 'ads' Scherbaum
<adsmail(at)wars-nicht(dot)de> wrote:

> 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.
>

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.

I agree that the naming is a little bit misleading.

--
Thanks

Bernd

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2009-03-06 12:01:26 Re: Writing values to relation using bytearray ...
Previous Message Kedar Potdar 2009-03-06 11:41:50 Re: Writing values to relation using bytearray ...