Hi
pá 17. 12. 2021 v 3:39 odesílatel Mladen Gogala <gogala.mladen@xxxxxxxxx> napsal:
On 12/16/21 16:48, Pavel Stehule wrote:
> I don't think Postgres needs packages - this is a redundant concept in
> Postgres, when Postgres has schemas (different from Oracle's schemas)
> and extensions.
>
Yes, ORAFCE uses schemas as the package names. However, one very
practical thing is missing: session variables. Yes, you can emulate
those with ON COMMIT PRESERVE ROWS temporary tables, but that's a rather
ugly hack.
Regards
Pavel
On the other hand, packages can easily be emulated by using Python.
Having packages would make PLPg/SQL programming much prettier. It would
be much prettier to group related routines into a package than to have
them laying around without anything indicating that the routines are
related. On the plus side, packages would make it much easier to migrate
from Oracle to Postgres. And you do want that, don't you?
I am very well aware of the animosity toward the Oracle community and
the reasons for that animosity. Oracle wiped the floor with the
predecessor of Postgres, the database called "Ingres". Sandra Kurtzig,
the Ingres CEO at the the time, and Michael Stonebraker were both
involved in very public spat with Larry Ellison. Stonebraker is still
very much a factor in Postgres community and I doubt that his feelings
toward the Larry and his company have got any warmer with years.
Postgres was created with the idea of fighting the Dark Lord in the land
of Belmont, CA. However, if it is the goal of the community to have
users convert from Oracle to Postgres, than making that conversion easy
would be conducive to that goal. A long time ago a former pastry baker
wrote the following article:
https://www.toolbox.com/tech/data-management/blogs/why-postgresql-doesnt-have-query-hints-020411/
Disclosure: I am the Oracle DBA that Josh Berkus is talking about in
that article. Recent events with "advice" to a very well known Oracle
personality testify to the fact that the emotions haven't changed much
since that article was written. Of course, Oracle is still the most
popular database in the world.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com