agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Robert.Patrick@cs.cmu.edu
To: postgres@postgres.Berkeley.EDU
Subject: Limit to where clause length???????
Date: Tue,  4 Oct 1994 21:10:52 -0400 (EDT)
Message-ID: <AiYToQS00hMd8UgK4N@cs.cmu.edu> (raw)

I am attempting to execute a query over several tables by stringing
together a where clause that match the correct attributes in each of
four tables.  

If I execute the following query, I get back a 10 tuples.

retrieve (models.all) where langLinks.source = models.id
	and langLinks.title = "Universal"

However, when I execute the following query, I get back an empty table.

retrieve (model.all) where (lang.Links.source = models.id 
	and langLinks.title = "Universal") or 
	(partLinks.source = models.id and partLinks.title = "Universal") or
	(userLinks.source = models.id and userLinks.title = "Universal") or
	(opLinks.source = models.id and opLinks.title = "Universal")

Why doesn't this query find the same tuples the first one finds?

Thanks,
Robert

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: Robert.Patrick@cs.cmu.edu
  Subject: Re: Limit to where clause length???????
  In-Reply-To: <AiYToQS00hMd8UgK4N@cs.cmu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox