Views and Limits

Started by Alexover 22 years ago3 messagesgeneral
Jump to latest
#1Alex
alex@meerkatsoft.com

Hi,

I am using a view that has also a LIMII 1000 in it. As it seems when I
run a query with a WHERE then the WHERE is only applied to the subset of
1000 records. So although the query my produce 3000 records, I may get
only a few hundred back.

Is there a way to get change that i.e. that the VIEW places a limit on
the final result?

Thanks
Alex

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex (#1)
Re: Views and Limits

Alex <alex@meerkatsoft.com> writes:

Is there a way to get change that i.e. that the VIEW places a limit on
the final result?

How would that possibly make any sense? A view is supposed to be a
self-contained, logically consistent object ... not something that
exerts magical action-at-a-distance powers upon queries that reference
it. As an example, would you still expect this restriction to work when
the view was used in a join, SELECT DISTINCT, or aggregate query? If
so, just what is getting limited?

regards, tom lane

#3Jonathan Bartlett
johnnyb@eskimo.com
In reply to: Tom Lane (#2)
Re: Views and Limits

How would that possibly make any sense? A view is supposed to be a
self-contained, logically consistent object ... not something that
exerts magical action-at-a-distance powers upon queries that reference
it.

Oh, I see, you just don't love us enough to give us magical powers to our
views. I bet you're saving that feature for yourself, huh?

:)

Jon