From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SQL-Invoked Procedures for 8.1 |
Date: | 2004-09-23 21:47:52 |
Message-ID: | 12345.1095976072@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2004-09-23 22:08:07 | Re: SQL-Invoked Procedures for 8.1 |
Previous Message | Greg Stark | 2004-09-23 21:42:02 | Re: SQL-Invoked Procedures for 8.1 |