Well, this is what I have discovered so far:

I left BLCKSZ as it was, but adjusted MAX_QUERY_SIZE to 65535, and ran make.
I tried to run a 50k query, and it worked; it took a while, but the results
were fine.  So, as a temporary solution to this problem, you should be able
to set MAX_QUERY_SIZE up to what you require (don't go overboard, and please
let me know of any problems).  However, make sure that you test it properly
first, because I didn't do extensive testing, just enough to make sure that
it didn't break immediately.  Also, please remember that long queries
definitely impact the query processor, so long queries are not a great idea
for online sub-systems.  They're not great for batch either, but at least
there you have a window to play with.

More news to come.....

MikeA



>> > 
>> > Troy wrote:
>> > >>  Does Postgres have any limitations on 
>> > >>  the length of queries?
>> > >>  
>> > >>  E.g. is "select one,two,three,...thousand from 
>> one,two,three,...thousand
>> > where one = x and two is >>  x and three is x and ... 
>> thousand = x" legal?
>> > >>  
>> > Yes, there is.  It is set to BLCKSZ * 2, at least in 6.5.  
>> BLCKSZ is
>> > normally 8192 bytes, so your query size will be 16k.  
>> However, I'm busy
>> > working on it at the moment, to make it unlimited (i.e.: 
>> limited by memory
>> > available).
>> > 
>> > MikeA
>> > 
>> > 
>> 

Sat, 17 Jul 1999 12:17:08 +0200
"Ansley, Michael" <Michael.Ansley@intec.co.za>
RE: query length limits