Comparing PostgreSQL to MySQL is like comparing a McDonalds to a good steak house. They each offer beef, but they each apply to different scenarios ;-).
In answer to your question about the difference between PostgreSQL's procedural language and Oracle's:
Yes, the general approach to PL/pgSQL is very much like PL/SQL, but it is apparently not as mature a language. In the latest version (7.3), they have fixed many things, but still, there are a few things missing (quoted from a knowledgeable Oracle/PostgreSQL user I was chatting with):
1. The number of parameters is limited to 32 (formerly 16)
2. It also does not allow for exception handling and recovering from simple problems like constraint violations.
3. PostgreSQL also does not support named parameters, passing by name, autonomous transactions, paramaterized cursors, output parms, etc...
However, PostgreSQL does have a couple things that Oracle does not have:
1. Several procedural languages: SQL, PL/pgSQL, Perl, Python, TCL, (and Java, coming soon, which will allow for exception handling, I imagine). Personally, I think it is
great to have Perl as a PL. It gives you an amazing amount of flexibility for handling complex logic and text manipulation. And, if you install the Perl language handler in "untrusted" mode, you have total freedom for your stored procedure to interact with the Unix environment, such as sending you an email from a trigger, system administration, etc...
2. Query rewrite rules. This can be thought of as a more elegant way to handle many things that would normally be done with triggers. It is a way to "redirect" a query, so that what is done on the front end translates to a different query (or queries) on the back end. Great for updating views, logging, adding to query logic, etc... -------------------------------------------
Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(