Re: Sample of user-define window function and other things - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Sample of user-define window function and other things
Date
Msg-id 29645.1231771357@sss.pgh.pa.us
Whole thread Raw
In response to Re: Sample of user-define window function and other things  (Gregory Stark <stark@enterprisedb.com>)
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Recovery Test Framework
Next
From: Bernd Helmle
Date:
Subject: Re: WIP: Automatic view update rules