From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Rafał Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: is there a way to deliver an array over column from a query window? |
Date: | 2013-04-26 13:09:21 |
Message-ID: | CAHyXU0xV058Px3w6thyaSs_nWSb6M+GEfG_SnuUyo5uzdrq2Dw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Apr 26, 2013 at 3:15 AM, Rafał Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> wrote:
> W dniu 04/26/2013 12:25 AM, Merlin Moncure pisze:
>
>> On Thu, Apr 25, 2013 at 1:30 PM, Rafał Pietrak <rafal(at)zorro(dot)isa-geek(dot)com>
>> wrote:
>
> [----------------------]
>
>>>
>>> No, I don't (manual:
>>> http://www.postgresql.org/docs/9.1/static/tutorial-window.html, have just
>>> one word "distinct" on that page, and it's not in the above context). And
>>> I
>>> cannot duplicate the above:
>>> --------------------------------------------
>>> # select array_agg(distinct v order by v desc) from (select
>>> generate_series(1,3) v union all select generate_series(1,3)) q;
>>> ERROR: syntax error at or near "order"
>>> LINE 1: select array_agg(distinct v order by v desc) from (select ge...
>>> --------------------------------------------
>>>
>>> Did I miss something??
>>
>> This feature was added w/9.0. This means you are on 8.4. Time to
>> upgrade...
>
>
> Yes, true. I kind of postpone that until debian-wheeze gets released as
> stable.
>
> But what about the postgres documentation. I haven't found that feature in
> postgres-v9.1 docs (link above). Where can I read about it?
see here:
http://www.postgresql.org/docs/9.2/static/sql-expressions.html#SYNTAX-AGGREGATES
(you were looking at the window function specific docs, not the
general aggregate documentation).
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Poole | 2013-04-26 14:21:08 | Re: Checking for changes in other tables |
Previous Message | Rafał Pietrak | 2013-04-26 11:56:26 | Re: is there a way to deliver an array over column from a query window? |