Re: SELECT FOR SHARE and FOR UPDATE - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: SELECT FOR SHARE and FOR UPDATE
Date
Msg-id 20051008021800.GG36108@pervasive.com
Whole thread Raw
In response to SELECT FOR SHARE and FOR UPDATE  ("Ilja Golshtein" <ilejn@yandex.ru>)
Responses Re: SELECT FOR SHARE and FOR UPDATE  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
On Fri, Oct 07, 2005 at 01:18:03PM +0400, Ilja Golshtein wrote:
> Hello!
>
> I want to select data from two tables obtaining
> exclusive lock for records of the first table and
> nonexclusive lock for records of the second one.
>
> In other words, I need something like
> select a.f, b.f from a,b for update of a for share of b.
> Any hints?
>
> Thanks.

From http://www.postgresql.org/docs/8.0/interactive/sql-select.html:
FOR UPDATE [ OF table_name [, ...] ]

I'm assuming that the syntax is the same for FOR SHARE.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: PostgreSQL Gotchas
Next
From: Manish Marathe
Date:
Subject: pgsql tests