agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
Limit to where clause length???????
3+ messages / 2 participants
[nested] [flat]

* Limit to where clause length???????
@ 1994-10-05 01:10  Robert.Patrick@cs.cmu.edu
  0 siblings, 1 reply; 3+ messages in thread

From: Robert.Patrick@cs.cmu.edu @ 1994-10-05 01:10 UTC (permalink / raw)
  To: legacy

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.
==============================================================================



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* More on:  Limit to where clause length?
@ 1994-10-05 02:10  Robert.Patrick@cs.cmu.edu
  parent: Robert.Patrick@cs.cmu.edu
  0 siblings, 1 reply; 3+ messages in thread

From: Robert.Patrick@cs.cmu.edu @ 1994-10-05 02:10 UTC (permalink / raw)
  To: legacy

It seems that the limit is not on the actual length of the where clause
but on the number of tables which can be referenced by one query (at
least in the where clause).

It appears that I can execute any combination of and's and or's in a
where clause as long as I don't access more than 3 tables.  The minute I
try to access 4 tables, even in a simpler query, Postgres simply returns
an empty table, even if there are tuples which match the query.

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.
==============================================================================



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: More on: Limit to where clause length?
@ 1994-10-05 06:02  Paul M. Aoki <aoki@cs.berkeley.edu>
  parent: Robert.Patrick@cs.cmu.edu
  0 siblings, 0 replies; 3+ messages in thread

From: Paul M. Aoki @ 1994-10-05 06:02 UTC (permalink / raw)
  To: Robert.Patrick@cs.cmu.edu; +Cc: legacy

Robert.Patrick@cs.cmu.edu writes:
> It appears that I can execute any combination of and's and or's in a
> where clause as long as I don't access more than 3 tables.  The minute I
> try to access 4 tables, even in a simpler query, Postgres simply returns
> an empty table, even if there are tuples which match the query.

src/examples/chapter15 contains several four-way joins.

there is no hardwired limit on the number of tables that you can 
reference in a query, though (as recently mentioned) there are some 
8kb buffers awaiting the unwary.
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   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.
==============================================================================



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~1994-10-05 06:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1994-10-05 01:10 Limit to where clause length??????? Robert.Patrick@cs.cmu.edu
1994-10-05 02:10 ` More on:  Limit to where clause length? Robert.Patrick@cs.cmu.edu
1994-10-05 06:02   ` Re: More on: Limit to where clause length? Paul M. Aoki <aoki@cs.berkeley.edu>

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