Ambiguous error message

Поиск
Список
Период
Сортировка
От Samuel Tardieu
Тема Ambiguous error message
Дата
Msg-id 87smiy1ej9.fsf@inf.enst.fr
обсуждение исходный текст
Ответы Re: Ambiguous error message  (Michael Glaesemann <grzm@myrealbox.com>)
Re: Ambiguous error message  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Ambiguous error message  (Michael Fuhr <mike@fuhr.org>)
Re: Ambiguous error message  (Bertrand Petit <pgsql-sql@phoe.frmug.org>)
Список pgsql-sql
In PostgreSQL 7.4, the following select:

select texten, total
from (select protocolid, count(*) as total) from ips where catid=1     group by protocolid order by protocolid) as c
innerjoin protocols using (protocolid);
 

gives the error message:

ERROR:  subquery in FROM must have an alias
HINT:  For example, FROM (SELECT ...) [AS] foo.

Why isn't the "as c" considered as an alias?
 Sam
-- 
Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/sam



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Stored procedures
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Ambiguous error message