From: Palle Girgensohn <girgen@partitur.se>
To: pgsql-sql@postgresql.org
Subject: Column reference X is ambiguous?
Date: Sun, 27 May 2001 07:32:14 +0200
Message-ID: <3B10915E.70D7A758@partitur.se> (raw)
Hi!
SELECT count(rf.userid) as count, rf.userid FROM read_faq rf,
faq f,
deltagare_saved d, person p WHERE rf.id = f.id AND f.kursid=20
AND
d.course_id = f.kursid AND d.userid = rf.userid AND
p.userid = d.userid GROUP BY userid
ERROR: Column reference "userid" is ambiguous
All of the tables have a userid, yes, but this query didn't
fail before 7.1.x. Is it really OK to fail in this case? I
thought SQL standard requires all GROUP|ORDER BY arguments to
acutally exist on the SELECT target list. Then, this makes me
puzzled... Are the joins making the userids get included in the
target in some hidden way?
/Palle
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: girgen@partitur.se
Subject: Re: Column reference X is ambiguous?
In-Reply-To: <3B10915E.70D7A758@partitur.se>
* 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