Re: max length of sql select statement ? - Mailing list pgsql-sql

From markus brosch
Subject Re: max length of sql select statement ?
Date
Msg-id 1057594820.881.115.camel@sam
Whole thread Raw
In response to Re: max length of sql select statement ?  (<mallah@trade-india.com>)
List pgsql-sql
On Mon, 2003-07-07 at 18:13, mallah@trade-india.com wrote:
> Well i DO NOT know the exact limit.
> May be someone else can answer it accurately.
> 
> But you could  produce the list within IN using a subselect
> that again depends on the exact problem.
> 

Maybe anybody knows how many?

Anyway: My exact problem is "in words" quite easy:
col1 | col2
------------123  | 958143  | 394124  | 345324  | 345346  | 541743  | 144346  | 986

Imagine, this table is really big (millions records). 
Now, I want to retrieve for all records in col A OR col B where either
123, 124, 144, 541 (and a view thousands more ...) fits.

As far as I understud you:
SELECT * FROM table 
WHERE col1 IN (123,124,144,541,...) 
OR col2 IN (123,124,144,541,...);

Cheers, Markus



pgsql-sql by date:

Previous
From: Rod Taylor
Date:
Subject: Re: max length of sql select statement ?
Next
From: Stephan Szabo
Date:
Subject: Re: max length of sql select statement ?