Re: SQL-Invoked Procedures for 8.1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SQL-Invoked Procedures for 8.1
Date
Msg-id 12345.1095976072@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL-Invoked Procedures for 8.1  (Greg Stark <gsstark@mit.edu>)
Responses Re: SQL-Invoked Procedures for 8.1  (Peter Mount <peter@retep.org.uk>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> however commit that and let the procedure launch its own transactions
>> (compare to VACUUM, db-wide CLUSTER, etc) once we have read the
>> procedure body from the catalogs and done any pre-parsing we want to do.

> Well I guess I'm wondering whether there's any need to commit at all.
> If you do commit then you wouldn't be able to do something like:

> CREATE PROCEDURE terminate_transaction()
>  COMMIT;
> END PROCEDURE

By commit I was thinking of CommitTransactionCommand, which isn't going
to exit a pre-existing transaction block, so I'm not sure that we are
disagreeing.

One interesting point is whether it's possible for one procedure to call
another, and if so what that means for the semantics.  Is the inner
procedure allowed to commit a transaction started by the outer one?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: SQL-Invoked Procedures for 8.1
Next
From: "Jim C. Nasby"
Date:
Subject: Re: SQL-Invoked Procedures for 8.1