Re: Functions in sort order - undocumented restriction

2018-02-10 Thread David G. Johnston
On Sat, Feb 10, 2018 at 4:40 AM, PG Doc comments form < nore...@postgresql.org> wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.5/static/queries-order.html > Description: > > This works: > > select distinct o.bid, organisatio

Re: Functions in sort order - undocumented restriction

2018-02-10 Thread Tom Lane
=?utf-8?q?PG_Doc_comments_form?= writes: > This does not work: > select distinct (o.bid), organisation, posttown, replace(case when postcode > ='' then null else trim(postcode) end, ' ', '') as pc, phone, o.active, > website, email, (select count(*) from notes as n where n.bid = o.bid) as nn > f

Re: Functions in sort order - undocumented restriction

2018-02-10 Thread David G. Johnston
On Saturday, February 10, 2018, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/9.5/static/queries-order.html > Description: > > This works: > > select distinct o.bid, organisation, posttown, replace(case