Re: Sample of user-define window function and other things

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sample of user-define window function and other things
Дата
Msg-id 29645.1231771357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Sample of user-define window function and other things  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Even if they can support it shouldn't they reject functions that aren't
> actually window functions? What happens if you mark a perfectly normal
> function as a window function, does it behave sanely?

Yes, for small values of "sane".  It will see all its arguments as NULL
(and will get called even if it was marked STRICT).  Whatever it returns
under those circumstances is what the result will be.

I do not offhand see a reasonable interpretation for the combination of
WINDOW and STRICT attributes, so perhaps it'd be sensible for CREATE
FUNCTION to throw an error for that.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Recovery Test Framework
Следующее
От: Bernd Helmle
Дата:
Сообщение: Re: WIP: Automatic view update rules