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

From Alvaro Herrera
Subject Re: What happened to the is_ family of functions proposal?
Date
Msg-id 1285088398-sup-7388@alvh.no-ip.org
Whole thread Raw
In response to Re: What happened to the is_ family of functions proposal?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: What happened to the is_ family of functions proposal?
Re: What happened to the is_ family of functions proposal?
List pgsql-hackers
Excerpts from Robert Haas's message of mar sep 21 11:56:51 -0400 2010:
> On Tue, Sep 21, 2010 at 11:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> > The problem here is that putting the exception handling in C doesn't
> > make things any better: it's still slow and inefficient.  And in the
> > general case the only way to be sure that a string will be accepted by
> > the input function is to try it.
> 
> Given the current API, that is true.

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.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Serializable snapshot isolation error logging
Next
From: Robert Haas
Date:
Subject: Re: Serializable snapshot isolation error logging