Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA26767; Tue, 26 May 92 21:49:00 -0700
Message-Id: <9205270449.AA26767@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: quel statement phrasing
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: mao@postgres.berkeley.edu
In-Reply-To: Your message of "Wed, 06 May 92 11:30:21 PDT."
             <9205061830.AA19648@postgres.Berkeley.EDU> 
Date: Tue, 26 May 92 21:48:49 PDT

you write:

> I have again run into a problem where quel statement phrasing seems
> to make the difference between a statement that works and a statement
> that doesn't work (the backend never responds), although both statements
> are syntactically valid and logically equivalent.

> In the second statement, am I violating some QUEL rule not stated in
> the documentation?  Is there a known problem with certain ways of
> phrasing statements (e.g., field ordering in multiple joins - which
> I have assumed until now is optimized automatically by the Postgres
> optimizer/planner)?

no, you're not doing anything wrong; the optimizer should generate valid
(and equivalent) plans from either of the queries you supply.  i was unable
to duplicate the behavior you describe here.  could you send me the schema
that you're using?

also, i note that your two queries are not actually equivalent:

    delete edge where (node.kind = 445) and (node.pid = 1149)
	and (node.name = graph.node) and (node.pid = graph.pid)
	and (graph.edge = edge.name) and (node.pid = graph.pid)\g

    delete edge where (node.kind = 445) and (node.pid = 1149)
	and (graph.node = node.name) and (graph.pid = node.pid)
	and (edge.name = graph.edge) and (edge.pid = node.pid)\g

in the first, the final qualification is (node.pid = graph.pid); in
the second, it's (edge.pid = node.pid).  is this difference significant,
or is it just a typo in your message?

if you send me the schema you're using when you see this problem, i'll
see if i can duplicate it here.
					mike olson
					project sequoia 2000
					uc berkeley
					mao@cs.berkeley.edu
