Re: Fwd: Bad Join moment - how is this happening?

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jamie Lawrence <postgres(at)jal(dot)org>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Fwd: Bad Join moment - how is this happening?
Date: 2003-07-30 19:39:35
Message-ID: 20030730123546.X39594-100000@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jamie Lawrence 2003-07-30 20:07:32 Fwd: Bad Join moment - how is this happening?
Previous Message Josh Berkus 2003-07-30 19:38:48 Re: Fwd: Bad Join moment - how is this happening?