>>>>> "Tom" == Tom Lane <t...@sss.pgh.pa.us> writes:
Tom> After examining this more closely, ISTM that the direct Tom> arguments are supposed to be processed as if they weren't inside Tom> an aggregate call at all. That being the case, isn't it flat Tom> out wrong for check_agg_arguments() to be examining the Tom> agg_ordset list? It should ignore those expressions whilst Tom> determining the aggregate's semantic level. As an example, an Tom> upper-level Var in those expressions isn't grounds for deciding Tom> that the aggregate isn't of the current query level. Hmm... yes, you're probably right; but we'd still have to check somewhere for improper nesting, no? since not even the direct args are allowed to contain nested aggregate calls. -- Andrew (irc:RhodiumToad) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers