| From: | Christopher Browne <cbbrowne(at)acm(dot)org> | 
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: Nested Sets | 
| Date: | 2005-04-16 21:34:28 | 
| Message-ID: | m31x9a2yor.fsf@knuth.cbbrowne.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
After takin a swig o' Arrakan spice grog, troels(at)arvin(dot)dk (Troels Arvin) belched out:
> On Sat, 16 Apr 2005 14:14:57 -0400, Andrew Sullivan wrote:
>> You shouldn't need to do anything special around table
>> locking.
>
> - Except of one wants "True Serializability" (see chapter 12.2 in the
> manual). But I don't know if it's possible to handle table locking from
> within a user defined function.
"Inside stored functions" is one of the ultimate examples of places
where you are certain to be honest-to-goodness inside a transaction.
You can't change transactions while inside a function; all the
in-the-function processing is sure to take place in one transaction's
context.
In theory, savepoints may ultimately change that a little bit, in that
you might have portions of processing in different subtransactions.
But nonetheless Andrew's point remains valid: There is no need to do
any special locking surrounding processing that goes on inside a
stored procedure because it is all suitably embedded in a transaction.
-- 
(reverse (concatenate 'string "moc.enworbbc" "@" "enworbbc"))
http://linuxdatabases.info/info/slony.html
"The problem with the current Lisp Machine system is that nothing ever
calls anything anymore."  -- KMP
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dinesh Pandey | 2005-04-18 03:50:37 | Error handling in pltcl | 
| Previous Message | Troels Arvin | 2005-04-16 20:02:24 | Re: Nested Sets |