Andrew Gierth <and...@tao11.riddles.org.uk> writes: > "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes: > Tom> I believe that the spec requires that the "direct" arguments of > Tom> an inverse or hypothetical-set aggregate must not contain any > Tom> Vars of the current query level.
> False. After examining this more closely, ISTM that the direct arguments are supposed to be processed as if they weren't inside an aggregate call at all. That being the case, isn't it flat out wrong for check_agg_arguments() to be examining the agg_ordset list? It should ignore those expressions whilst determining the aggregate's semantic level. As an example, an upper-level Var in those expressions isn't grounds for deciding that the aggregate isn't of the current query level. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers