From jyotiseth2001@gmail.com Wed Jun 13 11:58:13 2007 Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3BD569FBBEE for ; Wed, 13 Jun 2007 08:58:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 65445-05 for ; Wed, 13 Jun 2007 08:58:09 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.177]) by postgresql.org (Postfix) with ESMTP id C7C329FB602 for ; Wed, 13 Jun 2007 08:58:08 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id k40so239382wah for ; Wed, 13 Jun 2007 04:58:07 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:message-id:mime-version:content-type:x-mailer:thread-index:content-language; b=qptxDDWuidHIVNry8v8KWSRypFOj5/7rp6HDmlXgIxdZZObbgiAmBhqj2m+uPzn5sQwd5838EtcGksjlKeZR0WG8L8h5duwXKdTNxa+Z0bLaa/o+qK3nwDsw/yfvpThLdPFIQ8t7DHrdOCivC73Kb+Rq9rYg5OuU8Q7nf/FVUEo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:message-id:mime-version:content-type:x-mailer:thread-index:content-language; b=iu0EcPJtYDNW0r6soutNFsG4BMUoe8mz/rYmgZtfJsLqIWrkzHjmvNsgEhkNwwcBp1KaVokYx/HLbei0G2whKXhEjFYt2bfYZTob3vPWGQxbX7hVat6P5v/VgFq7Ik29LIalIpjvG+Uq4YrGS2fGflwm1+9VRJTD9yh2z1FS4OQ= Received: by 10.114.24.1 with SMTP id 1mr543899wax.1181735887096; Wed, 13 Jun 2007 04:58:07 -0700 (PDT) Received: from bitdldt04 ( [122.163.226.128]) by mx.google.com with ESMTP id l28sm746200waf.2007.06.13.04.58.04 (version=SSLv3 cipher=RC4-MD5); Wed, 13 Jun 2007 04:58:06 -0700 (PDT) From: "Jyoti Seth" To: , Subject: setof or array as input parameter to postgresql 8.2 functions Date: Wed, 13 Jun 2007 17:27:09 +0530 Message-ID: <000001c7adb1$fb497360$f1dc5a20$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C7ADE0.1501AF60" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acetsfha1du8U3HTS3qKdqoGUW6SsA== Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.115 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_90_100=0.113, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200706/769 X-Sequence-Number: 115592 This is a multipart message in MIME format. ------=_NextPart_000_0001_01C7ADE0.1501AF60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_0001_01C7ADE0.1501AF60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

------=_NextPart_000_0001_01C7ADE0.1501AF60-- From pavel.stehule@gmail.com Wed Jun 13 12:55:20 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id AD5649FB9D0 for ; Wed, 13 Jun 2007 09:55:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 70415-04 for ; Wed, 13 Jun 2007 09:55:10 -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.230]) by postgresql.org (Postfix) with ESMTP id B6A3C9FB490 for ; Wed, 13 Jun 2007 09:55:15 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 68so146468wri for ; Wed, 13 Jun 2007 05:55:14 -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=lMa7LsIo9M3NOHZKZq9LjODUhYsCrT3BA5LhqzaX7ZO6Ucl0qXxC9I2dYbLCfyeBk/YCk8TgGL3K6TMcOpYZMPWXqbNBBuPzysyyUSEzNW3qf4JBntPnFG9ansG62os5sN3wjnyvmyvnMAwFF4h96EvhqBFCJSVFVRZLXgA/vUU= 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=qiCaA6Nt7jEFNtR0zU5xVu1s0teBiCBFRjG/hTgLFfcOQSvcJId1F27PccPFHzZQpaKTokUHwYyWEpUfSGTjsxDYDwKRW46wjOGRSZE1HbhpHXFhiE7hkLMk3K3M5/zycfXoyWpv/8orqk9AGtOrc/kXuSjzxt9qNaTwjPGO0/4= Received: by 10.142.76.4 with SMTP id y4mr30298wfa.1181739313857; Wed, 13 Jun 2007 05:55:13 -0700 (PDT) Received: by 10.142.80.10 with HTTP; Wed, 13 Jun 2007 05:55:13 -0700 (PDT) Message-ID: <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> Date: Wed, 13 Jun 2007 14:55:13 +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: <000001c7adb1$fb497360$f1dc5a20$@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> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/771 X-Sequence-Number: 115594 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 From all@adv.magwien.gv.at Wed Jun 13 13:10:42 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8D79D9FBC2D; Wed, 13 Jun 2007 10:10:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 57914-10; Wed, 13 Jun 2007 10:10:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from fr112.ext.magwien.gv.at (relay-fr112.magwien.gv.at [217.149.225.66]) by postgresql.org (Postfix) with ESMTP id 38B559FB5AD; Wed, 13 Jun 2007 10:10:37 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by fr112.ext.magwien.gv.at (Postfix) with ESMTP id 11D866EF35; Wed, 13 Jun 2007 15:10:33 +0200 (CEST) Received: from exrat0.host.magwien.gv.at (exrat0.host.magwien.gv.at [10.136.132.84]) by fr112.ext.magwien.gv.at (Postfix) with ESMTP id 6C60B6EF45; Wed, 13 Jun 2007 15:10:32 +0200 (CEST) Received: from EXADV1.host.magwien.gv.at ([10.152.101.185]) by exrat0.host.magwien.gv.at with Microsoft SMTPSVC(6.0.3790.211); Wed, 13 Jun 2007 15:09:59 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: setof or array as input parameter to postgresql 8.2 functions Date: Wed, 13 Jun 2007 15:09:56 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [GENERAL] setof or array as input parameter to postgresql 8.2 functions Thread-Index: Acetsfha1du8U3HTS3qKdqoGUW6SsAACe4Ig References: <000001c7adb1$fb497360$f1dc5a20$@com> From: "Albe Laurenz" To: "Jyoti Seth *EXTERN*" , , X-OriginalArrivalTime: 13 Jun 2007 13:09:59.0542 (UTC) FILETIME=[25596160:01C7ADBC] X-Virus-Scanned: by amavisd-new using Sophie and ClamAV at magwien.gv.at X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/773 X-Sequence-Number: 115596 > I have to pass a set of values and arrays in postgresql 8.2=20 > functions. But I am not getting any help on that. Please let=20 > me know if any one has idea. Something like this? CREATE OR REPLACE FUNCTION sample(avalue integer, anarray text[]) RETURNS void LANGUAGE plpgsql STRICT AS $$DECLARE i integer; BEGIN -- I can access the value i :=3D avalue; -- I can access the array i :=3D anarray[2]; END;$$; Called like SELECT sample(3, ARRAY[1, 2, 3]); Yours, Laurenz Albe From jyotiseth2001@gmail.com Thu Jun 14 05:48:33 2007 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 From pavel.stehule@gmail.com Thu Jun 14 05:57:14 2007 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 From jyotiseth2001@gmail.com Thu Jun 14 06:05:13 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id ECE959FB610 for ; Thu, 14 Jun 2007 03:05:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 80991-06 for ; Thu, 14 Jun 2007 03:05:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by postgresql.org (Postfix) with ESMTP id 3C1C09FB618 for ; Thu, 14 Jun 2007 03:05:08 -0300 (ADT) Received: by nz-out-0506.google.com with SMTP id m22so392784nzf for ; Wed, 13 Jun 2007 23:05:07 -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=AcJ0WwBgTJ7zawe99MmNNJWrXDQZE6IMw45pac2lB1JxfGFT/IXEqjZs4S1WLMMZL++t/9VQtgTlyYReZaLpU4wcI0sDYhFvK4GqsAjj1J4KiFAnIn5IR/ly2tQqo22LIQDW9EY9jWLsamV2SAxxN0SzhYelWQGFkKhCt1xUwi0= 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=TfH99yZF/KjfBsCUDuksOST5t9Ku1UmMZaezLwo2A+X5Udee9G9xdn8Lh6SLpST0x3Fu6BGiEyOetd37UsIinWGpF6P2n62BQ1vJGIVS39aEunPFEleDYT6S1x5DugThGNiCqRc+pX8MFsnyp7lvx6X2O337WGPnWnnX3ogSurQ= Received: by 10.114.130.1 with SMTP id c1mr1496326wad.1181801107066; Wed, 13 Jun 2007 23:05:07 -0700 (PDT) Received: from bitdldt04 ( [122.162.156.12]) by mx.google.com with ESMTP id l22sm3414263waf.2007.06.13.23.05.04 (version=SSLv3 cipher=RC4-MD5); Wed, 13 Jun 2007 23:05:06 -0700 (PDT) From: "Jyoti Seth" To: "'Pavel Stehule'" Cc: , References: <000001c7adb1$fb497360$f1dc5a20$@com> <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> <003201c7ae47$7ff80460$7fe80d20$@com> <162867790706132257v53da9fb7raebee4f4ed50e00e@mail.gmail.com> In-Reply-To: <162867790706132257v53da9fb7raebee4f4ed50e00e@mail.gmail.com> Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Date: Thu, 14 Jun 2007 11:34:03 +0530 Message-ID: <003401c7ae49$d21007a0$763016e0$@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: AceuSNeEHCVvf67fQym2g7rqaNtHVgAAGvoQ Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/827 X-Sequence-Number: 115650 Thanks a lot. Regards, Jyoti -----Original Message----- From: Pavel Stehule [mailto:pavel.stehule@gmail.com] Sent: Thursday, June 14, 2007 11:27 AM 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 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 From rmgomez@indra.es Thu Jun 14 07:28:58 2007 Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 823D69FB929; Thu, 14 Jun 2007 04:28:58 -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 07940-08; Thu, 14 Jun 2007 04:28:50 -0300 (ADT) X-Greylist: delayed 00:24:51.866617 by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id D56749FBC95; Thu, 14 Jun 2007 04:28:52 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mailhost1.indra.es (mailhost1.indra.es [213.170.46.15]) by svr4.postgresql.org (Postfix) with SMTP id B157E5AF039; Thu, 14 Jun 2007 07:03:57 +0000 (GMT) Received: from MADARRMAIL3.indra.es ([192.168.10.13]) by mailhost1.indra.es with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Jun 2007 09:03:49 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Date: Thu, 14 Jun 2007 09:03:48 +0200 Message-ID: <12B09E52EF3AEF41AEF3D205BD4DF465012268E8@MADARRMAIL3.indra.es> In-Reply-To: <003401c7ae49$d21007a0$763016e0$@com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] setof or array as input parameter to postgresql 8.2 functions Thread-Index: AceuSNeEHCVvf67fQym2g7rqaNtHVgAAGvoQAAIzpUA= References: <000001c7adb1$fb497360$f1dc5a20$@com> <162867790706130555r5a1ba9cbq1c3e2cb0f1adbda7@mail.gmail.com> <003201c7ae47$7ff80460$7fe80d20$@com> <162867790706132257v53da9fb7raebee4f4ed50e00e@mail.gmail.com> <003401c7ae49$d21007a0$763016e0$@com> From: "Manso Gomez, Ramon" To: , X-OriginalArrivalTime: 14 Jun 2007 07:03:49.0413 (UTC) FILETIME=[288B7D50:01C7AE52] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/832 X-Sequence-Number: 115655 How can delete my suscription to this forums? -----Mensaje original----- De: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] En nombre de Jyoti Seth Enviado el: jueves, 14 de junio de 2007 8:04 Para: 'Pavel Stehule' CC: pgsql-general@postgresql.org; pgsql-sql@postgresql.org Asunto: Re: [SQL] setof or array as input parameter to postgresql 8.2 functions Thanks a lot. Regards, Jyoti -----Original Message----- From: Pavel Stehule [mailto:pavel.stehule@gmail.com] Sent: Thursday, June 14, 2007 11:27 AM 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 2007/6/14, Jyoti Seth : > Thanks for the solution. With this I am able to pass arrays and=20 > 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=20 > different arrays. Is there any way with which I can pass this as a=20 > 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org From pavel.stehule@gmail.com Thu Jun 14 07:41:34 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 6B6B19FBE54 for ; Thu, 14 Jun 2007 04:41:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 63347-07 for ; Thu, 14 Jun 2007 04:41:22 -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 BA4649FBE2A for ; Thu, 14 Jun 2007 04:41:30 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 68so398493wri for ; Thu, 14 Jun 2007 00:41:30 -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=JPdfJ3ndXyHYDC2XZaqsCvYW9MiaUhkT0ORsrlPoBPP9ShqWNthiEnwt7QXm+eXmWaWxRgmUC9G5N7+Ym9NOdaYG0V5FqdosH8v8NO+DlA5TjoJIxpvwRkxhsMOv1AzIkkpLfEW78Ev1JtArWaOVuPGExFzvm6saQdtW0tEeyHA= 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=hmnJW/qYJyVCp+SPaccq10fcGegwO69f4Se6n4eo0WYeK+RlY0fu41MTMm65uoFtwi9AB04+N79vMMFMC5KrBpjsfG4vfBVL64MX3R4CqUjp+i4n0Cmjlkm9X0k/jIg9tqxLOwMaZ2pMWtN8sVDxmBEnVvS6NKyk4Su3l0bXwp8= Received: by 10.142.84.3 with SMTP id h3mr77066wfb.1181806889558; Thu, 14 Jun 2007 00:41:29 -0700 (PDT) Received: by 10.142.80.10 with HTTP; Thu, 14 Jun 2007 00:41:29 -0700 (PDT) Message-ID: <162867790706140041r7593b868s34f82d1c7fadb7ea@mail.gmail.com> Date: Thu, 14 Jun 2007 09:41:29 +0200 From: "Pavel Stehule" To: "Manso Gomez, Ramon" 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: <12B09E52EF3AEF41AEF3D205BD4DF465012268E8@MADARRMAIL3.indra.es> 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> <162867790706132257v53da9fb7raebee4f4ed50e00e@mail.gmail.com> <003401c7ae49$d21007a0$763016e0$@com> <12B09E52EF3AEF41AEF3D205BD4DF465012268E8@MADARRMAIL3.indra.es> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/891 X-Sequence-Number: 115714 visit http://www.postgresql.org/community/lists/subscribe 2007/6/14, Manso Gomez, Ramon : > How can delete my suscription to this forums? > > -----Mensaje original----- > De: pgsql-sql-owner@postgresql.org > [mailto:pgsql-sql-owner@postgresql.org] En nombre de Jyoti Seth > Enviado el: jueves, 14 de junio de 2007 8:04 > Para: 'Pavel Stehule' > CC: pgsql-general@postgresql.org; pgsql-sql@postgresql.org > Asunto: Re: [SQL] setof or array as input parameter to postgresql 8.2 > functions > > Thanks a lot. > > Regards, > Jyoti > > -----Original Message----- > From: Pavel Stehule [mailto:pavel.stehule@gmail.com] > Sent: Thursday, June 14, 2007 11:27 AM > 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 > > 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 > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org >