From: Jean-Luc Lachance <jllachan@sympatico.ca>
To: Markus Bertheau <twanger@bluetwanger.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT MAX(c) FROM (SELECT ... FOR UPDATE) AS foo
Date: Tue, 17 Aug 2004 10:26:08 -0400
Message-ID: <41221580.7070907@sympatico.ca> (raw)
In-Reply-To: <1092740863.2627.17.camel@dicaprio.akademie1.de>
References: <1092740863.2627.17.camel@dicaprio.akademie1.de>
This query does not make sense to me.
Why would you create an updatable subquery just to get the highest value?
Maybe you are trying to achieve something other than what the query
suggest. You wou care to put in words what you want to do?
JLL
Markus Bertheau wrote:
> Hi,
>
> why is the following query not allowed:
>
> SELECT MAX(position) FROM (SELECT position FROM classes WHERE name =
> 'foo' FOR UPDATE OF classes) AS foo
>
> It's clear which rows should be locked here, I think.
>
> Thanks
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jllachan@sympatico.ca, twanger@bluetwanger.de
Subject: Re: SELECT MAX(c) FROM (SELECT ... FOR UPDATE) AS foo
In-Reply-To: <41221580.7070907@sympatico.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox