Re: Division by zero

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Division by zero
Дата
Msg-id 12861.1244123297@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Division by zero  (Sam Mason <sam@samason.me.uk>)
Ответы Re: Division by zero  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Sam Mason <sam@samason.me.uk> writes:
> If it's an SQL function and marked as IMMUTABLE it should (I believe
> anyway) get inlined somewhere along the line and take no more overhead
> than writing it out in full.

Actually, if you're intending that a SQL function be inline-able then
it's best *not* to mark it as IMMUTABLE (nor STRICT either).  If the
marking matches the behavior of the contained expression then it
doesn't matter, but if the marking is stricter than the expression
it will prevent inlining.  Rather than think hard, I usually just don't
annotate the SQL function at all.

            regards, tom lane

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

Предыдущее
От: "Carlos Oliva"
Дата:
Сообщение: Re: Upgrading Database: need to dump and restore?
Следующее
От: Greg Smith
Дата:
Сообщение: Re: warm standby with WAL shipping