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 4B80BB43168 for ; Mon, 7 Jul 2003 15:57:32 +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 36609-06 for ; Mon, 7 Jul 2003 12:57:21 -0300 (ADT) Received: from trade-india.com (ns1.trade-india.com [66.234.10.14]) by svr1.postgresql.org (Postfix) with SMTP id A7B96B438AD for ; Mon, 7 Jul 2003 12:57:20 -0300 (ADT) Received: (qmail 24909 invoked by uid 505); 7 Jul 2003 15:57:35 -0000 Received: from mallah@trade-india.com by ns1.trade-india.com by uid 502 with qmail-scanner-1.16 (clamscan: 0.54. spamassassin: 2.54. Clear:SA:0(-100.1/5.0):. Processed in 0.539385 secs); 07 Jul 2003 15:57:35 -0000 Received: from ns1.trade-india.com (HELO trade-india.com) (66.234.10.14) by ns1.trade-india.com with SMTP; 7 Jul 2003 15:57:34 -0000 Received: from 219.65.226.199 (SquirrelMail authenticated user mallah) by mail.trade-india.com with HTTP; Mon, 7 Jul 2003 21:27:34 +0530 (IST) Message-ID: <1101.219.65.226.199.1057593454.squirrel@mail.trade-india.com> Date: Mon, 7 Jul 2003 21:27:34 +0530 (IST) Subject: Re: max length of sql select statement ? From: To: In-Reply-To: <1057592658.881.93.camel@sam> References: <1057592658.881.93.camel@sam> X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/70 X-Sequence-Number: 14184 Depending on ur original problem EXISTS or IN may be usable EXISTS is efficient and IN can be used efficiently in 7.4 version of postgresql regds mallah. > 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 ;-) > > > > > ---------------------------(end of > broadcast)--------------------------- TIP 1: subscribe and unsubscribe > commands go to majordomo@postgresql.org ----------------------------------------- Get your free web based email at trade-india.com. "India's Leading B2B eMarketplace.!" http://www.trade-india.com/