Skip site navigation (1) Skip section navigation (2)

Re: review: More frame options in window functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: review: More frame options in window functions
Date: 2010-01-19 01:24:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com> writes:
> 2010/1/19 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> AFAICS that doesn't mean it can't be the
>> canonicalized form of the sort key. If a column is dropped out of the
>> canonical sort key then it's simply redundant, and hence not relevant to
>> determining the range.

> Yeah, that's my point, too. The planner has to distinguish "four" from
> sort pathkeys and to teach the executor the simple information which
> column should be used to determine frame. I was bit wrong because some
> of current executor code isn't like it, like using ordNumCols == 0 to
> know whether partition equals to frame, though....

BTW, watch out for the possibility that the canonicalized key is empty.
This isn't an error case --- what it means is that the planner has
proven that all the rows have equal sort key values, so there's no
need to compare anything.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-19 01:37:17
Subject: Re: plpgsql: open for execute - add USING clause
Previous:From: Robert HaasDate: 2010-01-19 00:49:59
Subject: Re: parallel regression test output

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group