Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Postgresql to Oracle migration issues

Re: Postgresql to Oracle migration issues

From: RHC <rclarence_at_juno.com>
Date: Wed, 28 Feb 2001 19:30:07 -0000
Message-ID: <t9qkdv4gcbca69@corp.supernews.com>

To answer your first question you could write a small PL/SQL function and then include it in your select statement (so you don't need a view)i.e.

select convert_to_money(column_a) from tableA where....

If you really need to handle user defined datatypes you will probably want to convert your Postgresql into PL/SQL using oracle PL/SQL records and possibly PL/SQL tables if you need arrays of those datatypes. I recommend looking thorugh Oracle8 PL/SQL programming by Scott Urman. It is an excellent book / reference for Oracle PL/SQL programming.

HTH
RHC Slavica Stefic wrote:
>
> Hello,
>
> I want to migrate to Oracle from the opensource database Postgresql.
>
> There are a couple of features of postgresql my application is depending
> on and it
> would require large amount of code rewriting if not provided by Oracle.
>
> 1) Datatypes
>
> Postgresql provides a "money" datatype wich outputs formatted money
> string.
> In oracle I can convert number to strings witch a format but how can I
> do it automatically for
> a particular colum (based on its datatype). Should I use views ?
>
> Postgresql provides an API for writing modules. I have implemented a
> "percent" type
> and some operators (+,*,...) and a "internal<->string" conversion
> function.
> I have seen something on user datatypes in oracle but I've seen nothing
> that can
> implement such a conversion between the object (datatype) and the output
> string
> (the select statement. For example "select a,b,c from mytable" ->
> "blabla | 2 % | 3 Kn "
> if 'b' is of type 'percent')
> In oracle object types cannot be output by a 'select'.
>
> Is there a way to implement extended types in oracle (written in C) ?
>
>
> Slavica Stefic
>

--
Posted via CNET Help.com
http://www.help.com/
Received on Wed Feb 28 2001 - 13:30:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US