Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates
Date: 2009-12-25 19:03:07
Message-ID: 162867790912251103s1aadd500s831ac403f0970cac@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/12/25 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> It is maybe a bug. I cannot use ORDER BY clause in two parameter aggregate.
>
> I think you don't understand the syntax.  Put the aggregate arguments
> first, then the ORDER BY.
>

I was wrong. But it should be syntax error no?

SELECT foo(expr ORDER BY expr, .....)

currently it quietly ignore arguments over ORDER BY clause.

Pavel

>                        regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-12-25 19:06:09 Re: info about patch: using parametrised query in psql
Previous Message Pavel Stehule 2009-12-25 19:00:03 Re: ORDER BY clause in aggregate doesn't work well with multi argument aggregates