Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f4SCYGA94774 for ; Mon, 28 May 2001 08:34:16 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from palle.girgensohn.se (c213.89.165.253.cm-upc.chello.se [213.89.165.253]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4R5WGA18545 for ; Sun, 27 May 2001 01:32:16 -0400 (EDT) (envelope-from girgen@partitur.se) Received: from partitur.se (localhost [127.0.0.1]) by palle.girgensohn.se (8.11.3/8.11.3) with ESMTP id f4R5WEg59688; Sun, 27 May 2001 07:32:14 +0200 (CEST) (envelope-from girgen@partitur.se) Message-ID: <3B10915E.70D7A758@partitur.se> Date: Sun, 27 May 2001 07:32:14 +0200 From: Palle Girgensohn Organization: Partitur X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-STABLE i386) X-Accept-Language: sv, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Column reference X is ambiguous? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200105/295 X-Sequence-Number: 3127 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