From: | Erik Jones <erik(at)myemma(dot)com> |
---|---|
To: | Randall Smith <randall(at)tnr(dot)cc> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pre-parser query manipulation |
Date: | 2007-03-14 23:20:29 |
Message-ID: | BA943C5B-FF9D-4D2D-93A6-FBCED17CEA68@myemma.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
This may be a dupe. I sent and had some issues with my mail client
and afterwards it was sitting all alone in my outbox, if you've
already seen this, sorry for the resend...
On Mar 14, 2007, at 2:08 PM, Randall Smith wrote:
> Hi,
>
> I'm attempting to process a query written in the form:
>
> SELECT fields FROM table WHERE conditions FOR UPDATE OF field_name
>
> when Postgresql supports:
>
> SELECT fields FROM table WHERE conditions FOR UPDATE OF table_name
>
> I'd like to remove the OF clause in the case only one table is
> queried.
>
> Anyone know of a solution to this?
The OF clause is optional in postrges. The semantics are thus:
Without OF clause: lock all rows in all tables in the from clause
that contribute data to the rows returned by your select statement.
So, if I'm understanding what you're asking here, just chop off the
OF clause and you're set.
With OF clause: lock only rows from the specified tables that
contribute data to the rows returned by your select statement.
There isn't any way that I know of to lock specific columns on a
table as it seems the first query you listed is doing.
erik jones <erik(at)myemma(dot)com>
sofware developer
615-296-0838
emma(r)
From | Date | Subject | |
---|---|---|---|
Next Message | Erik Jones | 2007-03-14 23:32:27 | Re: Lifecycle of PostgreSQL releases |
Previous Message | CAJ CAJ | 2007-03-14 23:17:56 | Lifecycle of PostgreSQL releases |