Re: What happened to the is_ family of functions proposal? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: What happened to the is_ family of functions proposal?
Date
Msg-id AANLkTik8FBMYDU=EcM83SGbaYx7rjds3tXZY5urxVgoO@mail.gmail.com
Whole thread Raw
In response to Re: What happened to the is_ family of functions proposal?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: What happened to the is_ family of functions proposal?
List pgsql-hackers
On Tue, Sep 21, 2010 at 6:02 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> So we could refactor the input functions so that there's an internal
> function that returns the accepted datum in the OK case and an ErrorData
> for the failure case.  The regular input function would just throw the
> error data in the latter case; but this would allow another function to
> just return whether it worked or not.

You're assuming the input function won't have any work it has to undo
which it would need the savepoint for anyways. For most of the
built-in datatypes -- all of the ones intended for holding real data
-- that's true. But for things like regclass or regtype it might not
be and for user-defined data types.... who knows?

Of course all people really want is to test whether something is a
valid integer, floating point value, etc.

--
greg


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Git conversion status
Next
From: Tom Lane
Date:
Subject: Re: .gitignore files, take two