Re: Alias-Error

From: Jost Richstein <jrichstein(at)softdecc(dot)com>
To: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: Alias-Error
Date: 2003-10-21 07:17:52
Message-ID: 3F94DDA0.C84A2E31@softdecc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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 <jrichstein(at)softdecc(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Markus Wollny 2003-10-21 08:38:22 Re: Recomended FS
Previous Message tmaus 2003-10-21 07:13:17 jboss postgresql pk generation

Browse pgsql-sql by date

  From Date Subject
Next Message Dharan 2003-10-21 07:34:24 Writing the SQL queries inside Functions and operators
Previous Message Tom Lane 2003-10-21 03:59:17 Re: assorted Postgres SQL/ORDBMS questions