Question on the right way to think about order by

From: Paula Kirsch <pl(dot)kirsch(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Question on the right way to think about order by
Date: 2018-07-03 14:26:59
Message-ID: CAHaXFP+cZ61H6UWV4iNsoRkHp=hNaydbeVSKD8iryimfbMYG3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When I think about using order by in a select statement, e.g.

select id, name, price from stuff order by name;

I think of order by as an operator sorting data returned by the select
statement.

When I think about order by in an aggregate statement, e.g.

select string_agg(product, ' | ' order by product) from products;

is it correct to think of order by as a parameter passed to string_agg?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-07-03 15:07:45 Re: Question on the right way to think about order by
Previous Message Melvin Davidson 2018-07-03 13:34:04 Re: Cloning schemas