From sgnerd@yahoo.com.sg Wed Oct 8 10:43:38 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0688CD1B4FC for ; Wed, 8 Oct 2003 10:43:38 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 31629-03 for ; Wed, 8 Oct 2003 07:42:53 -0300 (ADT) Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32]) by svr1.postgresql.org (Postfix) with SMTP id 3579AD1B50D for ; Wed, 8 Oct 2003 07:42:50 -0300 (ADT) Received: from ptil-138-190-chn.primus-india.net (HELO IVESIA67) (sgnerd@203.196.190.138 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 8 Oct 2003 10:42:46 -0000 Message-ID: <016801c38d89$9fed7080$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Possible to have array as input paramter for a function? Date: Wed, 8 Oct 2003 16:17:37 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0165_01C38DB7.B04E5100" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.6 tagged_above=0.0 required=5.0 tests=HTML_40_50, RCVD_IN_OSIRUSOFT_COM X-Spam-Level: * X-Archive-Number: 200310/94 X-Sequence-Number: 15494 This is a multi-part message in MIME format. ------=_NextPart_000_0165_01C38DB7.B04E5100 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Friends, I am working with Postgres 7.3.4 on RH Linux 7.2 and my windows client is P= gAdmin 3. Is it possible to pass a Varchar[] as a input parameter for a PL/pgSQL func= tion. While I tried it give a error=20 Type "varchar[]" does not exists. Does this is supported in Postgres? Anyone have a link or while paper on handling arrays in functions? Please enlighten me on this. Regards Kumar ------=_NextPart_000_0165_01C38DB7.B04E5100 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends,
 
I am working with Postgres 7.3.4 on RH Linux 7.2 and my= =20 windows client is PgAdmin 3.
 
Is it possible to pass a Varchar[] as a input parameter= for a=20 PL/pgSQL function. While I tried it give a error
    Type "varchar[]" does not=20 exists.
 
Does this is supported in Postgres?
 
Anyone have a link or while paper on handling arrays in= =20 functions?
 
Please enlighten me on this.
 
Regards
Kumar

------=_NextPart_000_0165_01C38DB7.B04E5100-- From georgew1@mts.net Wed Oct 8 12:52:51 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 09F50D1B517 for ; Wed, 8 Oct 2003 12:52:51 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 52872-01 for ; Wed, 8 Oct 2003 09:52:05 -0300 (ADT) Received: from smtp2.mts.net (smtp2.mts.net [205.200.16.113]) by svr1.postgresql.org (Postfix) with ESMTP id A3C74D1B4E2 for ; Wed, 8 Oct 2003 09:52:01 -0300 (ADT) Received: from cleartag (wnpgmb01ba1-ac05-p14-39.mts.net [142.161.14.39]) by smtp2.mts.net (8.12.8-20030918/8.11.3) with SMTP id h98CpRZH002538; Wed, 8 Oct 2003 07:51:28 -0500 (CDT) Message-ID: <001a01c38d9a$e5d8da60$270ea18e@cleartag> From: "George Weaver" To: "Kumar" , "psql" References: <016801c38d89$9fed7080$7502a8c0@hdsc.com> Subject: Re: Possible to have array as input paramter for a function? Date: Wed, 8 Oct 2003 07:50:31 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0013_01C38D70.D9386070" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/95 X-Sequence-Number: 15495 This is a multi-part message in MIME format. ------=_NextPart_000_0013_01C38D70.D9386070 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Kumar, It is possible to pass an array to a PL/pgSQL function, but I believe you m= ust specify the length of the array (at least doing so works for me). E.g. = "varchar(20)". Regards, George ----- Original Message -----=20 From: Kumar=20 To: psql=20 Sent: Wednesday, October 08, 2003 5:47 AM Subject: [SQL] Possible to have array as input paramter for a function? Dear Friends, I am working with Postgres 7.3.4 on RH Linux 7.2 and my windows client is= PgAdmin 3. Is it possible to pass a Varchar[] as a input parameter for a PL/pgSQL fu= nction. While I tried it give a error=20 Type "varchar[]" does not exists. Does this is supported in Postgres? Anyone have a link or while paper on handling arrays in functions? Please enlighten me on this. Regards Kumar ------=_NextPart_000_0013_01C38D70.D9386070 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Kumar,
 
It is possible to pass an array to a PL= /pgSQL=20 function, but I believe you must specify the length of the array (at least = doing=20 so works for me). E.g. "varchar(20)".
 
Regards,
George
----- Original Message -----
Fro= m:=20 Kumar<= /A>=20
Sent: Wednesday, October 08, 2003 = 5:47=20 AM
Subject: [SQL] Possible to have ar= ray as=20 input paramter for a function?

Dear Friends,
 
I am working with Postgres 7.3.4 on RH Linux 7.2 and = my=20 windows client is PgAdmin 3.
 
Is it possible to pass a Varchar[] as a input paramet= er for=20 a PL/pgSQL function. While I tried it give a error
    Type "varchar[]" does not=20 exists.
 
Does this is supported in Postgres?
 
Anyone have a link or while paper on handling arrays = in=20 functions?
 
Please enlighten me on this.
 
Regards
Kumar

------=_NextPart_000_0013_01C38D70.D9386070-- From georgew1@mts.net Wed Oct 8 14:08:10 2003 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 85F77D1B8A4 for ; Wed, 8 Oct 2003 14:08:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 60615-07 for ; Wed, 8 Oct 2003 11:07:28 -0300 (ADT) Received: from smtp2.mts.net (smtp2.mts.net [205.200.16.113]) by svr1.postgresql.org (Postfix) with ESMTP id 1E09AD1B587 for ; Wed, 8 Oct 2003 11:07:24 -0300 (ADT) Received: from cleartag (wnpgmb01bbw-ac01-p8-66.mts.net [142.161.8.66]) by smtp2.mts.net (8.12.8-20030918/8.11.3) with SMTP id h98E7MZH008238; Wed, 8 Oct 2003 09:07:23 -0500 (CDT) Message-ID: <003101c38da5$80abd150$270ea18e@cleartag> From: "George Weaver" To: "Kumar" , "psql" References: <016801c38d89$9fed7080$7502a8c0@hdsc.com> Subject: Re: Possible to have array as input paramter for a function? Date: Wed, 8 Oct 2003 09:06:47 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002E_01C38D7B.8083C900" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.7 tagged_above=0.0 required=5.0 tests=BAYES_30, HTML_40_50, RCVD_IN_OSIRUSOFT_COM, REFERENCES X-Spam-Level: X-Archive-Number: 200310/96 X-Sequence-Number: 15496 This is a multi-part message in MIME format. ------=_NextPart_000_002E_01C38D7B.8083C900 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Kumar, Looks like I got up too early this morning - please ignore my previous repl= y re: varchar(30) (I was looking at the wrong function :-( ).=20 I do use arrays in Pl/pgSQL functions, and have defined them as you did, e.= g. varchar[], which does not return an error. What version of PostgreSQL a= re you using? I am running 7.3.2. Regards, George ----- Original Message -----=20 From: Kumar=20 To: psql=20 Sent: Wednesday, October 08, 2003 5:47 AM Subject: [SQL] Possible to have array as input paramter for a function? Dear Friends, I am working with Postgres 7.3.4 on RH Linux 7.2 and my windows client is= PgAdmin 3. Is it possible to pass a Varchar[] as a input parameter for a PL/pgSQL fu= nction. While I tried it give a error=20 Type "varchar[]" does not exists. Does this is supported in Postgres? Anyone have a link or while paper on handling arrays in functions? Please enlighten me on this. Regards Kumar ------=_NextPart_000_002E_01C38D7B.8083C900 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Kumar,
 
Looks like I got up too early this morn= ing -=20 please ignore my previous reply re: varchar(30) (I was looking at the wrong= =20 function :-(  ).
 
I do use arrays in Pl/pgSQL functions, = and have=20 defined them as you did, e.g. varchar[], which does not return an error.&nb= sp;=20 What version of PostgreSQL are you using?  I am running 7.3.2.<= /DIV>
 
Regards,
George
----- Original Message -----
Fro= m:=20 Kumar<= /A>=20
Sent: Wednesday, October 08, 2003 = 5:47=20 AM
Subject: [SQL] Possible to have ar= ray as=20 input paramter for a function?

Dear Friends,
 
I am working with Postgres 7.3.4 on RH Linux 7.2 and = my=20 windows client is PgAdmin 3.
 
Is it possible to pass a Varchar[] as a input paramet= er for=20 a PL/pgSQL function. While I tried it give a error
    Type "varchar[]" does not=20 exists.
 
Does this is supported in Postgres?
 
Anyone have a link or while paper on handling arrays = in=20 functions?
 
Please enlighten me on this.
 
Regards
Kumar

------=_NextPart_000_002E_01C38D7B.8083C900--