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 11:07:18
Message-ID: 20090306120718.0c4c5f09@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 06 Mar 2009 10:50:41 +0000 Gregory Stark wrote:

> Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de> writes:
>
> > 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.
>
> Well the input function is being called before the validator function ever
> gets a chance to act. The validator function receives an already-formed isbn13
> datum.

That's the problem.

> Is there an is_valid() which takes text input? Perhaps there should be --
> though I think it would have to be isbn_is_valid() or something like that.

I think that's the intention of the is_valid() function. However it's
not working. And yes, a moe descriptive name would be fine.

Bye

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

In response to

Browse pgsql-hackers by date

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