Skip site navigation (1) Skip section navigation (2)

Re: Re: Not to start a flame war but what does Oracle have that Postgresql does not?

From: "Rob Richardson" <Rob(dot)Richardson(at)rad-con(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Re: Not to start a flame war but what does Oracle have that Postgresql does not?
Date: 2011-03-23 16:59:25
Message-ID: 04A6DB42D2BA534FAC77B90562A6A03D017CC1DB@server.rad-con.local (view raw or flat)
Thread:
Lists: pgsql-novice
-----Original Message-----

Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> Rob Richardson, 23.03.2011 16:40:
>> What do you mean by "real stored procedures"?  I only know PostGreSQL
>> stored procedures.  What are they missing?

> Postgres only has functions, no procedures.

Ignoring trivial syntax differences, I think the important point is that
in Oracle procedures execute outside the database engine, so to speak.
That means they can start and commit transactions.  In Postgres,
functions are called inside a transaction and they can't commit it or
start a new one.  They can run sub-transactions (savepoints) but they
can't commit a whole transaction.  So for example you can never make
partial results of a function's execution visible to another session.

			regards, tom lane

--

Thanks, Tom.  That's interesting.  I've wanted to use transactions in
functions in PostgreSQL, and not been able to.  For example, trying to
save debugging information to a table before raising an exception from
the function.  The exception gets raised, the transaction gets rolled
back, and the saved debugging information isn't there anymore.

RobR

In response to

pgsql-novice by date

Next:From: Mathieu DuboisDate: 2011-03-23 20:49:11
Subject: How many digits are printed with double precision?
Previous:From: Tom LaneDate: 2011-03-23 16:49:07
Subject: Re: Re: Not to start a flame war but what does Oracle have that Postgresql does not?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group