Re: What happened to the is_ family of functions proposal?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: What happened to the is_ family of functions proposal?
Дата
Msg-id 1285088398-sup-7388@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: What happened to the is_ family of functions proposal?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: What happened to the is_ family of functions proposal?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: What happened to the is_ family of functions proposal?  (Greg Stark <gsstark@mit.edu>)
Список 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 по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Serializable snapshot isolation error logging
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Serializable snapshot isolation error logging