Re: [PATCHES] [DOCS] Values list-of-targetlists patch for comments (was Re:

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] [DOCS] Values list-of-targetlists patch for comments (was Re:
Дата
Msg-id 27400.1155143250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] [DOCS] Values list-of-targetlists patch for comments (was Re:  (David Fetter <david@fetter.org>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> However, there are some oddities:
> postgres=# SELECT * FROM (VALUES (1,2)) AS foo(bar,baz);
> [ works ]
> postgres=# (VALUES (1,2)) AS foo(bar,baz);
> ERROR:  syntax error at or near "AS"

This is per spec.  Effectively, AS is part of the FROM-clause syntax
not part of a standalone command.  You can't write this either:

regression=# (select 1,2) as foo(bar,baz);
ERROR:  syntax error at or near "as"
LINE 1: (select 1,2) as foo(bar,baz);
                     ^

            regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: 8.2 features status
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: 8.2 features status