X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id AC8C4D1B538 for ; Tue, 28 Oct 2003 09:12:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 46443-09 for ; Tue, 28 Oct 2003 05:12:30 -0400 (AST) Received: from smtp102.mail.sc5.yahoo.com (smtp102.mail.sc5.yahoo.com [216.136.174.140]) by svr1.postgresql.org (Postfix) with SMTP id 6F5FBD1B536 for ; Tue, 28 Oct 2003 05:12:26 -0400 (AST) 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; 28 Oct 2003 09:12:25 -0000 Message-ID: <030101c39d33$43cdce80$7502a8c0@hdsc.com> Reply-To: "Kumar" From: "Kumar" To: "psql" Subject: Using % type in Parameters Date: Tue, 28 Oct 2003 14:39:47 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_02FE_01C39D61.55AC4E50" 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.1 tagged_above=0.0 required=5.0 tests=HTML_50_60, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200310/356 X-Sequence-Number: 15756 This is a multi-part message in MIME format. ------=_NextPart_000_02FE_01C39D61.55AC4E50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear Friends, Clarification about the support for the usage of % TYPE in Postgres. I am w= orking with postgres 7.3.4 on RH Linux 7.2. Can I use the %TYPE in paramete= rs as in Oracle. CREATE OR REPLACE FUNCTION public.fn_listtitle(varchar, varchar) RETURNS refcursor AS ' DECLARE ref REFCURSOR; BEGIN OPEN ref FOR SELECT "Lookuptype", "Lookupname"=20 FROM "Lookups"=20=20 WHERE "Lookuptype" =3D $1 AND=20 "Lookup_ID " =3D $2; END; ' LANGUAGE 'plpgsql' VOLATILE; Here can I use as CREATE OR REPLACE FUNCTION public.fn_listtitle(%Lookups.Lookuptype, %Lookup= s.Lookup_ID) Please shed some light. Regards Kumar ------=_NextPart_000_02FE_01C39D61.55AC4E50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear Friends,
 
Clarification about the support for the usage of % TYPE= in=20 Postgres. I am working with postgres 7.3.4 on RH Linux 7.2. Can I use the %= TYPE=20 in parameters as in Oracle.
 
CREATE OR REPLACE FUNCTION public.fn_listtitle(varchar,= =20 varchar)
  RETURNS refcursor AS
'
DECLARE
    ref       &= nbsp;=20 REFCURSOR;
BEGIN
OPEN ref FOR
           =             &nb= sp;          =20 SELECT "Lookuptype", "Lookupname"=20
            = ;            &n= bsp;         =20 FROM     "Lookups" =20
            = ;            &n= bsp;         =20 WHERE "Lookuptype" =3D $1 AND
           = ;=20                = =20                = =20     "Lookup_ID " =3D $2;
END;
'
  LANGUAGE 'pl= pgsql'=20 VOLATILE;
 
Here can I use as
CREATE OR REPLACE FUNCTION=20 public.fn_listtitle(%Lookups.Lookuptype, %Lookups.Lookup_ID)
 
Please shed some light.
 
Regards
Kumar

------=_NextPart_000_02FE_01C39D61.55AC4E50--