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