Re: Aliias names in select criteria

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Bob Powell <Bob(at)hotchkiss(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Aliias names in select criteria
Date: 2002-06-05 15:51:14
Message-ID: 20020605084550.R14451-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 4 Jun 2002, Bob Powell wrote:

>
> To whom it may concern:
>
> The following selection criteria causes my box to start a process that gives no result.
>
> SELECT P.Last_Name, P.First_Name, S.Status, S.Entry_Year,
> S.Graduation_Year, S.Former_School, S.Day_or_Board, S.Admissions_Id,
> P.Participant_Id, P.Birthday, P.Modification_Date FROM Participants P,
> Students S WHERE Participant.Participant_Id = Students.Participant_Id

AFAIK the above is technically illegal. Postgres assumes you meant to
have Participant and Students in the from list (in addition to P and S)
and thus you get a 4 way join with only some of the tables being
constrained.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-06-05 15:53:44 Re: a trigger question
Previous Message Andrew Sullivan 2002-06-05 15:36:31 Re: Re^3 : Solaris Performance - 64 bit puzzle