Received: from xyzzy.lan.internal (turbo-173.kingston.net [216.123.190.173]) by postgresql.org (Postfix) with ESMTP id D4B984767A7 for ; Tue, 12 Mar 2002 12:46:29 -0500 (EST) Received: from drew by xyzzy.lan.internal with local (Exim 3.35 #1 (Debian)) id 16kqLv-0005Bj-00; Tue, 12 Mar 2002 12:46:23 -0500 Date: Tue, 12 Mar 2002 12:46:22 -0500 To: feblec@ig.com.br Cc: pgsql-sql@postgresql.org Subject: Re: SELECT FOR UPDATE Message-ID: <20020312174622.GB19889@xyzzy.dhs.org> References: <20020312012356.35108475965@postgresql.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <20020312012356.35108475965@postgresql.org> User-Agent: Mutt/1.3.27i From: "Andrew G. Hammond" X-Fnord: +++ath X-WebTV-Stationery: Standard; BGColor=black; TextColor=black X-Message-Flag: Message text blocked: ANTI-MICROSOFT OPINIONS X-BeenThere: drew@xyzzy.dhs.org X-Archive-Number: 200203/120 X-Sequence-Number: 7001 --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 11, 2002 at 10:31:32PM -0300, feblec@ig.com.br wrote: > Any example ? Or this is select not implemented ? ( V7.2 )=20 It's implemented, and has been for a while. Here's a trivial example. BEGIN; SELECT * FROM stuff WHERE stuff_id =3D '1' FOR UPDATE; -- row 1 is now locked (exclusive), so we can do what needs doing UPDATE stuff SET something =3D 'whatever' WHERE stuff_id =3D '1'; COMMIT; This is covered in the manual, see http://www2.ca.postgresql.org/users-lounge/docs/7.2/postgres/sql-select.html I don't mind answering newbie questions like this in the appropriate=20 forum (pgsql-novice list for example). In the future please at least check the manual or give it a try before posting. :) --=20 Andrew G. Hammond mailto:drew@xyzzy.dhs.org http://xyzzy.dhs.org/~drew/ 56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F 613-389-5481= =20 5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1 "To blow recursion you must first blow recur" -- me --E39vaYmALEf/7YXx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjyOPu4ACgkQCT73CrRXhLGgcwCdGXiBCOd7A+Tqvv3emL2cjrUu 174An2ytcSB5q/1s6vPj9xeKQ4GTpTOp =DDHN -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx--