BUG #13833: Postgres ORDER BY value inside json causes “column does not exist” error - Mailing list pgsql-bugs

From ttmigueltt@gmail.com
Subject BUG #13833: Postgres ORDER BY value inside json causes “column does not exist” error
Date
Msg-id 20151226171902.2673.54859@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13833: Postgres ORDER BY value inside json causes “column does not exist” error
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13833
Logged by:          Michael Milton
Email address:      ttmigueltt@gmail.com
PostgreSQL version: 9.4.4
Operating system:   Fedora 22
Description:

It's probably easiest to link to the StackOverflow question I posted:
http://stackoverflow.com/questions/34472961/postgres-order-by-value-inside-json-causes-column-does-not-exist-error

The summary of it is that this query throws the error "column sets does not
exist", despite the fact that it is created in the SELECT clause:

SELECT
    coalesce(block.name, 'Other') as name,
    json_agg(set.data) as sets
FROM
    set
    FULL OUTER JOIN block ON set.block_id = block.id
GROUP BY block.id
ORDER BY sets



pgsql-bugs by date:

Previous
From: 付施威
Date:
Subject: How can I install postgresql 9.X on Compute with IBM's Power CPU ?
Next
From: los_mas_buscados1995@hotmail.com
Date:
Subject: BUG #13834: llenado