Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XA0GV-0001LC-J9 for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 17:23:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XA0GV-0002e8-1I for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2014 17:23:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA0GT-0002cQ-U0 for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 17:23:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XA0GP-0004Ah-Pd for pgsql-bugs@postgresql.org; Wed, 23 Jul 2014 17:23:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6NHNWx7020244; Wed, 23 Jul 2014 13:23:32 -0400 From: Tom Lane To: Simon Riggs cc: pgsql-bugs Subject: Re: syntax error WITH ORDINALITY In-reply-to: References: Comments: In-reply-to Simon Riggs message dated "Wed, 23 Jul 2014 18:12:16 +0100" Date: Wed, 23 Jul 2014 13:23:32 -0400 Message-ID: <20243.1406136212@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Simon Riggs writes: > postgres=# select * from unnest(ARRAY[1,2,3]) with ordinality; > unnest | ordinality > --------+------------ > 1 | 1 > 2 | 2 > 3 | 3 > postgres=# select unnest(ARRAY[1,2,3]) with ordinality; > ERROR: syntax error at or near "ordinality" > LINE 1: select unnest(ARRAY[1,2,3]) with ordinality; This is not a bug. The WITH ORDINALITY option is only available in FROM. I don't see any place in the documentation that suggests otherwise. > Also, WITH ORDINALITY is not mentioned here... > http://www.postgresql.org/docs/devel/static/functions-array.html Indeed. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs