Re: Declaring a strict function returns not null / eval speed

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Declaring a strict function returns not null / eval speed
Дата
Msg-id 821.1571771210@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Declaring a strict function returns not null / eval speed  (Andres Freund <andres@anarazel.de>)
Ответы Re: Declaring a strict function returns not null / eval speed  (Christoph Berg <myon@debian.org>)
Re: Declaring a strict function returns not null / eval speed  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-10-20 10:27:19 -0400, Tom Lane wrote:
>> "RETURNS NOT NULL", perhaps?  That'd have the advantage of not requiring
>> any new keyword.

> That could work.

Actually, I think we probably don't need any SQL representation of this
at all, because if what you're going to do with it is omit logically
necessary null-value checks, then a wrong setting would trivially crash
the server.  Therefore, we can never give the ability to set this flag
to users; we could only set it on built-in functions.

(But that saves a lot of work, eg dump/restore support isn't needed
either.)

This doesn't seem too awful to me, because non-builtin functions are
most likely slow enough that it doesn't matter.

            regards, tom lane



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

Предыдущее
От: Alexey Kondratov
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: Declaring a strict function returns not null / eval speed