X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 2E4A1B435E9 for ; Mon, 7 Jul 2003 15:46:54 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 32955-04 for ; Mon, 7 Jul 2003 12:46:43 -0300 (ADT) Received: from mail.bgm-gmbh.de (gamma.bgm-hosting.de [217.115.144.90]) by svr1.postgresql.org (Postfix) with ESMTP id 17511B43168 for ; Mon, 7 Jul 2003 12:46:43 -0300 (ADT) Received: from bgm-gmbh.de (localhost [127.0.0.1]) by mail.bgm-gmbh.de (Postfix) with ESMTP id 79604B656A for ; Mon, 7 Jul 2003 17:46:42 +0200 (CEST) Received: from [141.40.169.188] (unknown [141.40.169.188]) by mail.bgm-gmbh.de (Postfix) with ESMTP id 7DE0DB650D for ; Mon, 7 Jul 2003 17:46:41 +0200 (CEST) Subject: max length of sql select statement ? From: markus brosch To: pgsql-sql Content-Type: text/plain Organization: Message-Id: <1057592658.881.93.camel@sam> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 07 Jul 2003 17:44:19 +0200 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/69 X-Sequence-Number: 14183 Hi All! I was searching the archive and was wondering why nobody asked this strange(!) question (or I've not found it?): "What is the max allowed length of a sql statement or query?" I want to combine hundrets or thousands 'OR' within a select statement. Possible or not (e.g: SELECT * FROM table WHERE col='a' OR col='b' OR col='c' OR ...... ) This would be a very "dirty" or some would say, a "horrible" solution; but how are you searching through your table with sql, when your SELECT is against a collection of different elements (e.g. Array of Strings, which should fit on one column and return all records which fit) Hope for help cheers Markus - sql beginner ;-)