Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBwDC-0008Aa-6V for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jul 2015 02:32:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZBwDA-0007ab-00 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 Jul 2015 02:32:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZBBuB-00021x-SM for pgsql-bugs@postgresql.org; Sat, 04 Jul 2015 01:06:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZBBu7-0007qe-BG for pgsql-bugs@postgresql.org; Sat, 04 Jul 2015 01:06:06 +0000 MIME-Version: 1.0 Subject: BUG #13486: How can I sort unnest results? To: pgsql-bugs@postgresql.org From: longzou@hotmail.com Date: Sat, 04 Jul 2015 01:05:45 +0000 Message-ID: <20150704010545.1190.24623@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13486 Logged by: Long Zou Email address: longzou@hotmail.com PostgreSQL version: 9.4.4 Operating system: Mac OS X Description: I have a query that using the unnest function. But I don't know how to sort the result. For example: select * from unnest(array[1,2,3,4,5,6], array[10,8,3,6,8,2], array['ab', 'dd','','dd','st']); The result will have three columns and those name are 'unnest'. So, if I use unnest as the order by cause, it will raise an error: ERROR: ORDER BY "unnest" is ambiguous. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs