X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 652DD53657 for ; Sat, 16 Apr 2005 19:17:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26455-08 for ; Sat, 16 Apr 2005 22:17:47 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 53C9D53677 for ; Sat, 16 Apr 2005 19:17:47 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j3GMHjXZ030193 for ; Sat, 16 Apr 2005 22:17:45 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j3GLo0Bo024028 for pgsql-sql@postgresql.org; Sat, 16 Apr 2005 21:50:00 GMT (envelope-from news) From: Christopher Browne X-Newsgroups: pgsql.sql Subject: Re: Nested Sets Date: Sat, 16 Apr 2005 17:34:28 -0400 Organization: cbbrowne Computing Inc Lines: 27 Message-ID: References: <20050416181457.GA14377@phlogiston.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org X-message-flag: Outlook is rather hackable, isn't it? X-Home-Page: http://www.cbbrowne.com/info/ X-Affero: http://svcs.affero.net/rm.php?r=cbbrowne User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4 (Jumbo Shrimp, linux) Cancel-Lock: sha1:NkvUyWmAT9goJdci1RDTVaUqMdc= To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200504/236 X-Sequence-Number: 21129 After takin a swig o' Arrakan spice grog, troels@arvin.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