Received: from smtp.snet.net (smtp.snet.net [204.60.6.55]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66GU3a52742 for ; Fri, 6 Jul 2001 12:30:03 -0400 (EDT) (envelope-from wweng@kencast.com) Received: from pop.snet.net (pop.snet.net [204.60.6.9]) by smtp.snet.net (8.11.1/8.11.1/SNET-mx-1.4/D-1.10/O-1.7) with ESMTP id f66GU1C28954; Fri, 6 Jul 2001 12:30:01 -0400 (EDT) Received: from [192.168.1.83] (167.95.252.64.snet.net [64.252.95.167]) by pop.snet.net (8.11.1/8.11.1/SNET-pop-1.5/D-1.8/O-1.6) with ESMTP id f66GU1r21529; Fri, 6 Jul 2001 12:30:01 -0400 (EDT) Subject: Re: Is function atomic? From: Wei Weng To: Peter Eisentraut Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain X-Mailer: Evolution/0.10 (Preview Release) Date: 06 Jul 2001 13:35:51 -0400 Message-Id: <994440962.16301.1.camel@Monet> Mime-Version: 1.0 X-Archive-Number: 200107/69 X-Sequence-Number: 3853 Does that mean if I used DECLARE ... BEGIN DO_STUFF END; the DO_STUFF will not be interrupted (maintain atomicity) even when multiple threads use the function concurrently? On 06 Jul 2001 18:13:37 +0200, Peter Eisentraut wrote: > Wei Weng writes: > > > If it is not, is it possible to acquire a lock on a row ? how about a > > lock on a table? > > SQL statements issued by server-side functions operate with the same > transaction isolation semantics as "normal" SQL statements. However, > whatever the function does outside the database may obviously have > different semantics. > > -- > Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter > > -- Wei Weng Network Software Engineer KenCast Inc.