Search Postgresql Archives

Re: Cancel query based on a timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stijn Vanroye wrote:

Thanks for the reply Shridhar and Tom.

But am I mistaken if setting this timeout parameter would affect all query's? That would not be the desired result. What I would like is to stop the execution of a specific (active) query if it is taking to long. If I execute the query, and it starts running, I would like to be able to abort that running query.

In pgAdmin III you have a 'stop' button when you are running a query (next to the little green 'start' arrow). I would like to be able to implement something similar in my application.

You could put the database connection in asynchronous mode and use PQrequestCancel.


Please check http://www.postgresql.org/docs/7.3/static/libpq-async.html.

This is native C interface though. I have no idea to make it work with delphi and/or ODBC.

HTH

Shridhar

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux