pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roberto Mello <rmello@cc.usu.edu>
To: Unnikrishnan Menon <unnikrishnan.menon@chennai.transys.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Porting Oracle Packages
Date: Wed, 9 Jan 2002 09:04:33 -0700
Message-ID: <20020109160433.GA20109@cc.usu.edu> (raw)
In-Reply-To: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN>
References: <005601c197fc$6cee16a0$e90aa8c0@UNNIKRISHNAN>

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



view thread (3+ messages)

Message-ID: <20020109160433.GA20109@cc.usu.edu>
Permalink:  ../20020109160433.GA20109@cc.usu.edu/
Also on:    postgresql.org/message-id/20020109160433.GA20109@cc.usu.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rmello@cc.usu.edu, unnikrishnan.menon@chennai.transys.net
  Subject: Re: Porting Oracle Packages
  In-Reply-To: <20020109160433.GA20109@cc.usu.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox