Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C49039FBC8D for ; Thu, 14 Jun 2007 02:57:14 -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 56114-10 for ; Thu, 14 Jun 2007 02:57:09 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by postgresql.org (Postfix) with ESMTP id 4A07B9FBC84 for ; Thu, 14 Jun 2007 02:57:11 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 68so381409wri for ; Wed, 13 Jun 2007 22:57:08 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=t7jrLnGldctPLfxt81Dz4f2TwErb0cFvmByVhKUmOikcUzWOH5I1NszrjVqaXFodPxPKIGhdzHNuj9TdcZ8Ry/+wLe8v3Mf4YR8Bwkgp7U93pSbV5AForrjcqHQXuhK8rtP7IWnwdhDnhDxMVvzR2PsAYZTPdmb35zn6TDKryCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YVHy9/j58OmGXmKYJj/nctT7pDzcpLVIvxeg/AxxMBIercSoZeDKBMmjkdmQ/HLisIwNEPYdtgUVm1blEzWgO3NDJk68IUZc4aenllacaWyx8ahUB1CcEWXejPGhPEu26UVmPPiUggceCl7069qhcp/rviuZPEzYAwTk5wxhEBQ= Received: by 10.142.72.21 with SMTP id u21mr73543wfa.1181800628123; Wed, 13 Jun 2007 22:57:08 -0700 (PDT) Received: by 10.142.80.10 with HTTP; Wed, 13 Jun 2007 22:57:08 -0700 (PDT) Message-ID: <162867790706132257v53da9fb7raebee4f4ed50e00e@mail.gmail.com> Date: Thu, 14 Jun 2007 07:57:08 +0200 From: "Pavel Stehule" To: "Jyoti Seth" Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Cc: pgsql-general@postgresql.org, pgsql-sql@postgresql.org In-Reply-To: <003201c7ae47$7ff80460$7fe80d20$@com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <000001c7adb1$fb497360$f1dc5a20$@com> <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> <003201c7ae47$7ff80460$7fe80d20$@com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/826 X-Sequence-Number: 115649 2007/6/14, Jyoti Seth : > 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. > > You have to wait for 8.3 where arrays on composite types are supported. Currently in one our application we use array of arrays where different types are too, and we cast it to text. Regards Pavel