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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sample of user-define window function and other things
Date: 2009-01-08 13:11:41
Message-ID: 13089.1231420301@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2009-01-08 13:30:05 Re: Sample of user-define window function and other things
Previous Message Tom Lane 2009-01-08 12:58:44 Re: New patch for Column-level privileges