Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 69E079FB38A for ; Thu, 14 Jun 2007 02:48:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 49631-01 for ; Thu, 14 Jun 2007 02:48:28 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by postgresql.org (Postfix) with ESMTP id A7FFF9FB401 for ; Thu, 14 Jun 2007 02:48:29 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id k40so617293wah for ; Wed, 13 Jun 2007 22:48:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:cc:references:in-reply-to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language; b=ryLugTi9HGv8l+FIY/3KEMdq+60XCaz79b0mDNTkF98uUwvJWPENtjITY9EZ2dQIMmIbqbKtGU9sB7X+HwZaWKBqq2vg9eiASuMuyYDgEDG/AY4t4NT3aHZ9Gq+lPEBVzxc2oWsymLBlWrwdtoBonywiZTo4CL0AHg9LCtcz2Ow= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:cc:references:in-reply-to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:thread-index:content-language; b=nJcAWnwHD1HDhdTnpt/0c7NQBEbgiBV6WbMROcqnuoAZBic4/iDeuu9Tf+Gl3Vt1D4ZPOuV4alt7+SXuuhmiQj5zBdyoWUR9EVlPsCtaIt/R/kApDdvGDhFUDqwK+YMrwQhTmQxkZQkXA0o715c/mKh/jXhDWY7iCRU+3wq/7eY= Received: by 10.114.209.1 with SMTP id h1mr1503059wag.1181800108678; Wed, 13 Jun 2007 22:48:28 -0700 (PDT) Received: from bitdldt04 ( [122.162.156.12]) by mx.google.com with ESMTP id m40sm3310528wag.2007.06.13.22.48.25 (version=SSLv3 cipher=RC4-MD5); Wed, 13 Jun 2007 22:48:27 -0700 (PDT) From: "Jyoti Seth" To: "'Pavel Stehule'" Cc: , References: <000001c7adb1$fb497360$f1dc5a20$@com> <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> In-Reply-To: <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Date: Thu, 14 Jun 2007 11:17:27 +0530 Message-ID: <003201c7ae47$7ff80460$7fe80d20$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcetuhWG/8xIfOouTqyq0j9c2oVBSQAjCdUw Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/825 X-Sequence-Number: 115648 Thanks for the solution. With this I am able to pass arrays and multidimensional arrays in postgresql functions. One of my problem is still left I want to pass set of values with different datatypes.For eg: I want to pass following values to the function: 1 ajay 1000.12 2 rita 2300.24 3 leena 1230.78 4 jaya 3432.45 As the values have different data types I have to create three different arrays. Is there any way with which I can pass this as a single setof values. Thanks, Jyoti -----Original Message----- From: Pavel Stehule [mailto:pavel.stehule@gmail.com] Sent: Wednesday, June 13, 2007 6:25 PM To: Jyoti Seth Cc: pgsql-general@postgresql.org; pgsql-sql@postgresql.org Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Hello maybe: create function foo(varchar[][]) returns void as $$ begin end$$ language plpgsql; postgres=# select foo(array[array[1,2], array[2,2]]::varchar[][]); foo ----- (1 row) Regards Pavel Stehule 2007/6/13, Jyoti Seth : > > > > > Hi, > > > > I have to pass a set of values and arrays in postgresql 8.2 functions. But I > am not getting any help on that. Please let me know if any one has idea. > > > > Thanks, > > Jyoti