Re: Fwd: Bad Join moment - how is this happening? - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Fwd: Bad Join moment - how is this happening?
Date
Msg-id 20030730123546.X39594-100000@megazone.bigpanda.com
Whole thread Raw
In response to Fwd: Bad Join moment - how is this happening?  (Jamie Lawrence <postgres@jal.org>)
List pgsql-sql
On Wed, 30 Jul 2003, Jamie Lawrence wrote:

> I have a view:
>
> create or replace view addenda as
> select
>         documents.id,
>         documents.oid,
>         documents.projects_id,
>         documents.doc_num,
>         documents.description,
>         documents.date,
>         documents.createdate,
>         documents.moddate,
>         documents.people_id,
>         documents.parent,
>         documents.document_type,
>         documents.state,
>         documents.machines_id,
>         documents.phases_id,
>
>         d_addenda.item_num,
>         d_addenda.drawing_reference
>
> from
>         d_addenda as a, documents as d
>                 where a.documents_id =  d.id;

I think you're being bitten by from clause
addition.  You're referencing documents in the
select list rather than d so it's probably
adding an unconstrained join to documents.



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Fwd: Bad Join moment - how is this happening?
Next
From: Eric Clark
Date:
Subject: Re: One to many query question