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 FCC43E475C076688490CFCAB@teje
Whole thread Raw
In response to Re: 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 11:32:14 +0100 Andreas 'ads' Scherbaum
<adsmail@wars-nicht.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


pgsql-hackers by date:

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