From: Samuel Tardieu <sam@rfc1149.net>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Ambiguous error message
Date: Sat, 3 Jan 2004 01:55:12 +0100
Message-ID: <2004-01-03-01-55-12+trackit+sam@rfc1149.net> (raw)
In-Reply-To: <3DB0CA70-3D86-11D8-A298-000A95C88220@myrealbox.com>
References: <87smiy1ej9.fsf@inf.enst.fr>
<3DB0CA70-3D86-11D8-A298-000A95C88220@myrealbox.com>
On 2/01, Michael Glaesemann wrote:
| I'm not quite sure what you want the query to return, but you've got a
| problem with your parentheses.
I can't believe this :) I got hit by the "inner query needs to be aliased"
message and added it to the wrong place and them munged the query a lot.
The correct one was of course:
# 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);
(PostgreSQL is used for the will-spam-for-food black-list, see
http://www.rfc1149.net/wsff)
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, grzm@myrealbox.com
Subject: Re: Ambiguous error message
In-Reply-To: <2004-01-03-01-55-12+trackit+sam@rfc1149.net>
* 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