X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1A99FD1B532; Wed, 22 Oct 2003 08:19:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57051-07; Wed, 22 Oct 2003 05:19:00 -0300 (ADT) Received: from webmail.muc.domeus.com (mail.ecircle.de [62.67.54.176]) by svr1.postgresql.org (Postfix) with ESMTP id 0498ED1B4F8; Wed, 22 Oct 2003 05:18:58 -0300 (ADT) Received: from coppola.ecircle.de (unknown [192.168.1.142]) by webmail.muc.domeus.com (READY) with ESMTP id 9839A800A; Wed, 22 Oct 2003 10:18:52 +0200 (CEST) Subject: Re: Alias-Error From: Csaba Nagy To: jrichstein@softdecc.com Cc: Postgres general mailing list , pgsql-sql@postgresql.org In-Reply-To: <3F94DDA0.C84A2E31@softdecc.com> References: <3F867086.DF4DEDF0@softdecc.com> <19199.1066315399@sss.pgh.pa.us> <3F94DDA0.C84A2E31@softdecc.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-11) Date: 22 Oct 2003 10:18:52 +0200 Message-Id: <1066810732.7092.69.camel@coppola.ecircle.de> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/1053 X-Sequence-Number: 51126 You have the alias in upper case: "C2", and postgres complains about a lower case "c2". May be this some case sensitivity problem ? Just a thought. HTH, Csaba. On Tue, 2003-10-21 at 09:17, Jost Richstein wrote: > Ok. The exact error message is as follows: > > SQLException Time : Mon Oct 20 13:15:25 CEST 2003 > SQLException ErrorCode : 0 > SQLException SQLState : null > SQLException Message : ERROR: Relation "c2" does not exist > SQLException Connection: 4878867 > > The query is something like this: > > SELECT DISTINCT C2.cmc_mchap, C2.cmc_sort > FROM sis_cmca, sis_cmca C2 > WHERE cm_status != 'U' AND sis_cmca.cmc_name='INTERN2000' AND > C2.cmc_name='INTERN2000' AND sis_cmca.cmc_mchap=C2.cmc_mchap > > Tom Lane wrote: > > > > Jost Richstein writes: > > > I am running a query with alias (a self join) against > > > version 7.3.4 on Suse Linux 7.3 and on FreeBSD (v5?). > > > It runs fine on Linux, but produces an error on > > > FreeBSD: "unknown alias C2". > > > > The string "unknown alias" appears nowhere in the 7.3 sources. > > Are you sure you are talking to a Postgres database? > > > > regards, tom lane > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html