From: Samuel Tardieu <sam@rfc1149.net>
To: pgsql-sql@postgresql.org
Subject: Ambiguous error message
Date: Fri, 02 Jan 2004 17:49:46 +0100
Message-ID: <87smiy1ej9.fsf@inf.enst.fr> (raw)
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
inner join 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sam@rfc1149.net
Subject: Re: Ambiguous error message
In-Reply-To: <87smiy1ej9.fsf@inf.enst.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox