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 13089.1231420301@sss.pgh.pa.us
Whole thread Raw
In response to Sample of user-define window function and other things  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Responses Re: Sample of user-define window function and other things  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
List pgsql-hackers
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
> - CREATE FUNCTION command accepts WINDOW keyword for non-c language
> like plpgsql. Don't we need to throw error?

No.  CREATE FUNCTION has no business trying to keep track of which
PLs implement what.  That case won't do anything useful right now,
but it might do something useful sometime before 8.4 is dead ...

> - Is WinGetFuncArgInPartition()'s argument mark_pos required? For the
> newbies to window functions, it seems a bit confusing, but
> WinSetMarkPos() looks enough for the purpose AFAIK.

You mean set_mark?  It's just to save an extra calculation of the
absolute location of the fetched row.  See leadlag_common for an
example use: we can truncate the tuplestore if the offset is constant.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: New patch for Column-level privileges
Next
From: Peter Eisentraut
Date:
Subject: Re: about truncate