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

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: What happened to the is_ family of functions proposal?
Дата
Msg-id AANLkTik8FBMYDU=EcM83SGbaYx7rjds3tXZY5urxVgoO@mail.gmail.com
обсуждение исходный текст
Ответ на Re: What happened to the is_ family of functions proposal?  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: What happened to the is_ family of functions proposal?  (Robert Haas <robertmhaas@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Git conversion status
Следующее
От: Tom Lane
Дата:
Сообщение: Re: .gitignore files, take two