From unnikrishnan.menon@chennai.transys.net Tue Jan 8 04:22:53 2002 Received: from chennai.transys (chennai.transys.net [12.33.140.105]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g084MqB61096 for ; Mon, 7 Jan 2002 23:22:53 -0500 (EST) (envelope-from unnikrishnan.menon@chennai.transys.net) Received: from UNNIKRISHNAN ([192.168.10.233]) by chennai.transys with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id CGH4YDTQ; Tue, 8 Jan 2002 10:05:24 +0530 Message-ID: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN> From: "Unnikrishnan Menon" To: Subject: Porting Oracle Packages Date: Tue, 8 Jan 2002 09:54:49 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0051_01C1982A.83256940" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200201/50 X-Sequence-Number: 6141 This is a multi-part message in MIME format. ------=_NextPart_000_0051_01C1982A.83256940 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, 1.I have a package in Oracle to be ported to PostgreSQL.=20 The package consists of three procedures. Anybody could give any suggestion on the porting methodology. 2. Any idea as to what is the equivalent of the following Oracle code in Po= stgresql: Type xyz is Table of userid.user_account%type index by binary_integer; prev_id xyz; dummy xyz; Thanx in advance, Unnikrishnan=20 ------=_NextPart_000_0051_01C1982A.83256940 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
1.I have a package in Oracle to be ported = to=20 PostgreSQL.
   The package consists of three= =20 procedures.
    Anybody could give any= =20 suggestion on the porting methodology.
 
2. Any idea as to what is the equivalent o= f the=20 following Oracle code in Postgresql:
 
Type xyz is Table of userid.user_account%t= ype index=20 by binary_integer;
prev_id xyz;
dummy xyz;
 
Thanx in advance,
 
Unnikrishnan
 
------=_NextPart_000_0051_01C1982A.83256940-- From josh@agliodbs.com Tue Jan 8 20:29:35 2002 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g08KTZB59378 for ; Tue, 8 Jan 2002 15:29:35 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.7) with HTTP id 550114; Tue, 08 Jan 2002 12:29:33 -0800 From: "Josh Berkus" Subject: Re: Porting Oracle Packages To: "Unnikrishnan Menon" , X-Mailer: CommuniGate Pro Web Mailer v.3.4.7 Date: Tue, 08 Jan 2002 12:29:33 -0800 Message-ID: In-Reply-To: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200201/55 X-Sequence-Number: 6146 Unnikrishnan, (wow! Don't you have a nickname?) > 1.I have a package in Oracle to be ported to PostgreSQL. > The package consists of three procedures. > Anybody could give any suggestion on the porting methodology. See: http://techdocs.postgresql.org/ there are considerable resources for Oracle --> postgres porting there. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco From rmello@cc.usu.edu Wed Jan 9 16:01:06 2002 Received: from brasileiro.net (slxwy.dorms.usu.edu [129.123.236.160]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g09G16B17875 for ; Wed, 9 Jan 2002 11:01:06 -0500 (EST) (envelope-from roberto@brasileiro.net) Received: from roberto by brasileiro.net with local (Exim 3.33 #1 (Debian)) id 16OLDO-0005JM-00; Wed, 09 Jan 2002 09:04:34 -0700 Date: Wed, 9 Jan 2002 09:04:33 -0700 From: Roberto Mello To: Unnikrishnan Menon Cc: pgsql-sql@postgresql.org Subject: Re: Porting Oracle Packages Message-ID: <20020109160433.GA20109@cc.usu.edu> References: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN> User-Agent: Mutt/1.3.25i X-Archive-Number: 200201/66 X-Sequence-Number: 6156 On Tue, Jan 08, 2002 at 09:54:49AM +0530, Unnikrishnan Menon wrote: > > 1.I have a package in Oracle to be ported to PostgreSQL. > The package consists of three procedures. > Anybody could give any suggestion on the porting methodology. Josh already pointed you to the docs, so I won't do it again :) > 2. Any idea as to what is the equivalent of the following Oracle code in Postgresql: > > Type xyz is Table of userid.user_account%type index by binary_integer; > prev_id xyz; > dummy xyz; There's no structure in PL/pgSQL or any of the PostgreSQL procedural languages that will map directly to this. I remember I ported procedures with "type foo is Table of bar..." using PL/Tcl arrays once, but it wasn't pretty. Best thing is to think what are you trying to _accomplish_ with the procedure, and then re-write it as a PL/pgSQL function. -Roberto -- +----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer 7 Days without pizza makes one weak...