X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 07FBFD6DB0 for ; Wed, 12 Oct 2005 03:13:32 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55444-08 for ; Wed, 12 Oct 2005 06:13:28 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 726F9D7A79 for ; Wed, 12 Oct 2005 03:13:28 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j9C6DOru084101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Oct 2005 00:13:26 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id j9C6DOso003747; Wed, 12 Oct 2005 00:13:24 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id j9C6DMnY003746; Wed, 12 Oct 2005 00:13:22 -0600 (MDT) (envelope-from mfuhr) Date: Wed, 12 Oct 2005 00:13:22 -0600 From: Michael Fuhr To: ashish srivastava Cc: pgsql-admin@postgresql.org Subject: Re: Regarding array of parameter passing from application to the database Message-ID: <20051012061322.GA3592@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 required=5 tests=[AWL=0.005] X-Spam-Level: X-Archive-Number: 200510/129 X-Sequence-Number: 19201 On Tue, Oct 11, 2005 at 07:24:52PM +0530, ashish srivastava wrote: > can anybody help me in passing an array of parameters to the postgresql > functions. What functions? Server-side functions that you've created? What argument types do those functions take? Arrays of some base type? > I am having multiple check boxes on the UI and searching in the database on > the basis whichever is the user selection criterion.. What client-side language are you using? How are you receiving the checkbox choices? As an array with the selected elements? If your API can't automatically create a PostgreSQL array from a client language array, then you could build a string that represents the array using one of the formats described in the "Arrays" section of the PostgreSQL documentation: http://www.postgresql.org/docs/8.0/interactive/arrays.html If that's not what you're looking for then please provide more information. BTW, this seems off-topic for pgsql-admin. Pgsql-interfaces, pgsql-general, pgsql-novice, or perhaps pgsql-php (if you're using PHP) would be more appropriate. -- Michael Fuhr