Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"
Дата
Msg-id 3910372.1655149134@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"  (Bryn Llewellyn <bryn@yugabyte.com>)
Список pgsql-general
Bryn Llewellyn <bryn@yugabyte.com> writes:
> OK, so I'm obliged to answer.
> Because SQL rests on the principle that you just say *what* you want but
> not *how*.

It also rests on the principle that the programmer shouldn't be too
concerned about micro-efficiencies.  You've given a perfectly good
six-line implementation of what you want; use it and be happy.

> Oracle Database 12c Release 2 (and later) has a validate_conversion() built-in.

[ shrug... ]  We are not Oracle.  One of the main ways in which we
are not Oracle is that we support extensible database functionality.
To write a "validate_conversion" function that supports extension
datatypes, but doesn't use something morally equivalent to a
subtransaction, would be a nightmare: large, fragile, and probably
not all that much faster.

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"