Skip site navigation (1) Skip section navigation (2)

Re: Set statement timeout in the query tool

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Set statement timeout in the query tool
Date: 2009-12-04 13:09:55
Message-ID: 9837222c0912040509k73420029p49b17f1ccb46ef50@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Fri, Dec 4, 2009 at 10:52, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> On Fri, Dec 4, 2009 at 9:41 AM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>> Hi,
>>
>> Someone, on a french PostgreSQL forum, ask me for a statement timeout UI in
>> the query tool. Here is what I've done so far:
>>
>>  * add a config in the Query tab of the Options window;
>>  * add a textbox in the toolbar of the query tool;
>
> We certainly don't need both.

Definitely not. I'd go with just the textbox, if any.


>>  * each query executed will first get the old statement_timeout value, set
>>   statement_timeout to the text box one (which is initialized with the config
>>   value), execute the real query, and then get back to the old value
>
> Why save/reset it? The next query will just change it again anyway,
> and there's no way round that.
>
>> I checked the UI on Windows, Mac OS X, and Linux.
>
> What's wrong with just setting it manually in the script anyway? There
> are various parameters people might want to set, that we definitely
> don't want to add UI for. I'll concede that statement_timeout is more
> likely to be used than most others, but it seems to me that forcing it
> to be set with every query is far less flexible than just setting it
> as and when required in your script.

I think the use-case is to have a default value for people who may
otherwise send off a query that takes way too long? But in that case,
it's probably better implemented as a default value on the server
side, no?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2009-12-04 13:17:01
Subject: Re: Set statement timeout in the query tool
Previous:From: Dave PageDate: 2009-12-04 09:52:33
Subject: Re: Set statement timeout in the query tool

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group