Re: RE: RE: Re: select substr???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: RE: RE: Re: select substr???
Дата
Msg-id 5197.987187128@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: RE: Re: select substr???  (Jeff Eckermann <jeckermann@verio.net>)
Список pgsql-sql
Jeff Eckermann <jeckermann@verio.net> writes:
> You are correct, the check for "$1 is null" is not required.  I was
> attempting an optimisation, as in "don't do anything else if this is null".
> The gain would depend on how much further processing the function would
> attempt before recognizing that it was dealing with a null value, which is
> something that I don't know enough to tell.

In 7.1, checking for null would be appropriate unless you've declared
the function "strict".  A strict function won't even be called for null
input, rather a null result will be assumed automatically --- with much
less overhead than an explicit test for null would need.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Mailing list gripes (was Re: Re: Maybe a Bug, maybe bad SQL)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Calling plSQL functions