Re: syntax error WITH ORDINALITY
От | Simon Riggs |
---|---|
Тема | Re: syntax error WITH ORDINALITY |
Дата | |
Msg-id | CA+U5nMJjOc8j+VKN5bMsya6ErazXM1OVcpaeyWKGzwCwo34ufQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: syntax error WITH ORDINALITY (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
On 23 July 2014 18:23, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Simon Riggs <simon@2ndQuadrant.com> 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. The phrase "The WITH ORDINALITY option is only available in FROM." is a clear and useful statement; it isn't in the docs and should be. Or we should have an ERROR message that says "WITH ORDINALITY may not be used in the SELECT clause". Perhaps both. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления: