Re: SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5
Date: 2009-09-21 19:18:11
Message-ID: 603c8f070909211218uf4d66eam564e837052f37248@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 21, 2009 at 3:14 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Robert Haas escribió:
>
>> Of course, I don't want:
>>
>> - GUCs that I'm going to set, execute one statement, and the unset
>> (and this likely falls into that category).
>> - GUCs that are poorly designed so that it's not clear, even to an
>> experienced user, what value to set.
>> - GUCs that exist only to work around the inability of the database to
>> figure out the appropriate value without user input.
>>
>> On the flip side, rereading the thread, one major advantage of the GUC
>> is that it can be used for statements other than SELECT, which
>> hard-coded syntax can't.  That might be enough to make me change my
>> vote.
>
> Perhaps we'd benefit from a way to set a variable for a single query;
> something like
>
> WITH ( SET query_lock_timeout = 5s ) SELECT ...
>
> Of course, this particular syntax doesn't work because WITH is already
> taken.

Yeah, I thought about that. I think that would be sweet. Maybe

LET (query_lock_timeout = 5 s) IN SELECT ...

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-09-21 19:27:11 Re: Adding \ev view editor?
Previous Message Alvaro Herrera 2009-09-21 19:14:27 Re: SELECT ... FOR UPDATE [WAIT integer | NOWAIT] for 8.5