pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedOracle Package equivalent in Postgres
4+ messages / 4 participants
[nested] [flat]
* Oracle Package equivalent in Postgres
@ 2020-08-06 12:22 Firthouse banu <penguinsfairy@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Firthouse banu @ 2020-08-06 12:22 UTC (permalink / raw)
To: pgsql-admin
Hi Postgres master minds,
Am currently working on migrating databases from oracle to Postgres.
Am going to work on crons and packages in oracle which needs to be
converted in Postgres. How to convert package in oracle to Postgres. Is
there any equivalent in Postgres if not how it works in Postgres.
Eagerly waiting for replies.
Thanks
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Oracle Package equivalent in Postgres
@ 2020-08-06 12:41 Holger Jakobs <holger@jakobs.com>
parent: Firthouse banu <penguinsfairy@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Holger Jakobs @ 2020-08-06 12:41 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hi,
It depends on what you want to achieve with using packages.
If you just want to group a number of functions and procedures, just
create a schema for it (schemas are totally unrelated to users in
PostgreSQL), e. g.
CREATE SCHEMA functions;
and then
CREATE FUNCTION functions.f1 (integer) RETURNS integer LANGUAGE plgpsql
AS $$
...
$$;
Unfortunately, there are no schema related variables. You will have to
resort to saving values in some (temporary, unlogged, normal) table.
There is another way of using a setting as a variable described here:
https://dba.stackexchange.com/questions/165361/assign-the-result-of-current-settingthe-setting-to-a-...
Regards,
Holger
Am 06.08.20 um 14:22 schrieb Firthouse banu:
> Hi Postgres master minds,
>
> Am currently working on migrating databases from oracle to Postgres.
> Am going to work on crons and packages in oracle which needs to be
> converted in Postgres. How to convert package in oracle to Postgres.
> Is there any equivalent in Postgres if not how it works in Postgres.
>
> Eagerly waiting for replies.
>
> Thanks
>
--
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Oracle Package equivalent in Postgres
@ 2020-08-06 13:34 MichaelDBA <MichaelDBA@sqlexec.com>
parent: Firthouse banu <penguinsfairy@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: MichaelDBA @ 2020-08-06 13:34 UTC (permalink / raw)
To: Firthouse banu <penguinsfairy@gmail.com>; +Cc: pgsql-admin
Hi,
ora2pg is a standard way to migrate stuff from ORA to PG. It also will
attempt to translate packages/procs/funcs from PL/SQL to PL/pgSQL. For
packages, the output can be separate files with
package_name_func/proc_name, or you can group packages into separate
output directories where you can subsequently load them into separate PG
schemas to distinguish one ORA package from another.
Regards,
Michael Vitale
Firthouse banu wrote on 8/6/2020 8:22 AM:
> Hi Postgres master minds,
>
> Am currently working on migrating databases from oracle to Postgres.
> Am going to work on crons and packages in oracle which needs to be
> converted in Postgres. How to convert package in oracle to Postgres.
> Is there any equivalent in Postgres if not how it works in Postgres.
>
> Eagerly waiting for replies.
>
> Thanks
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Oracle Package equivalent in Postgres
@ 2020-08-06 14:03 JC JC <shekharjchandra@hotmail.co.uk>
parent: MichaelDBA <MichaelDBA@sqlexec.com>
0 siblings, 0 replies; 4+ messages in thread
From: JC JC @ 2020-08-06 14:03 UTC (permalink / raw)
To: MichaelDBA <MichaelDBA@sqlexec.com>; Firthouse banu <penguinsfairy@gmail.com>; +Cc: pgsql-admin
Good info Michael,
I used ora2pg tool to migrate Oracle DB objects (particularly tables, constraints, sequences) into Postgres.
The TYPE attribute of ora2pg will tell if the DDL need to migrate or the Data or any other export type.
Though I have not explored any other tools, I found ora2pg is very efficient and this can be automated either using windows batch script or unix shell script.
Regards
jc
________________________________
From: MichaelDBA <MichaelDBA@sqlexec.com>
Sent: 06 August 2020 14:34
To: Firthouse banu <penguinsfairy@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: Oracle Package equivalent in Postgres
Hi,
ora2pg is a standard way to migrate stuff from ORA to PG. It also will
attempt to translate packages/procs/funcs from PL/SQL to PL/pgSQL. For
packages, the output can be separate files with
package_name_func/proc_name, or you can group packages into separate
output directories where you can subsequently load them into separate PG
schemas to distinguish one ORA package from another.
Regards,
Michael Vitale
Firthouse banu wrote on 8/6/2020 8:22 AM:
> Hi Postgres master minds,
>
> Am currently working on migrating databases from oracle to Postgres.
> Am going to work on crons and packages in oracle which needs to be
> converted in Postgres. How to convert package in oracle to Postgres.
> Is there any equivalent in Postgres if not how it works in Postgres.
>
> Eagerly waiting for replies.
>
> Thanks
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-08-06 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 12:22 Oracle Package equivalent in Postgres Firthouse banu <penguinsfairy@gmail.com>
2020-08-06 12:41 ` Holger Jakobs <holger@jakobs.com>
2020-08-06 13:34 ` MichaelDBA <MichaelDBA@sqlexec.com>
2020-08-06 14:03 ` JC JC <shekharjchandra@hotmail.co.uk>
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