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--