Thread: query length limits

query length limits

From
"tjk@tksoft.com"
Date:
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? 

I could test this of course, but I am curious about the real
limits imposed by the system, and any possible consequences,
plus any changes planned in the future which might affect
this issue.


Thanks,


Troy

Troy Korjuslommi                Tksoft OY, Inc.
tjk@tksoft.com                  Software Development
                                Open Source Solutions
                                Hosting Services

RE: query length limits

From
"Ansley, Michael"
Date:
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