Re: strange evaluation Window function and SRF functions?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strange evaluation Window function and SRF functions?
Date: 2012-07-30 17:10:08
Message-ID: 5016BFF0.6070802@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> it looks like row_number is evaluated before SRF - this behave is
> absolutely undefined - for me - more native behave is different evaluation.

SRFs which return multiple rows in the SELECT clause have ALWAYS behaved
oddly when it comes to row evaluation (LIMIT, COUNT(), etc.). This
isn't necessarily desireable, but it is consistent with past releases,
and it's not in any way limited to Windowing functions. In general, if
you care about rows when calling such an SRF, you need to subselect it.

It would be nice to clean that up, but you'd have to start with a
comprehensive definition of what the behavior *should* be in all common
cases. And then you'd be in for a big code overhaul.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2012-07-30 17:11:01 Re: [PATCH] Support for foreign keys with arrays
Previous Message Pavel Stehule 2012-07-30 16:47:45 Re: strange evaluation Window function and SRF functions?