Re: [HACKERS] Killing the backend to cancel a long waiting query

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: [HACKERS] Killing the backend to cancel a long waiting query
Дата
Msg-id 3F6A43C5.27871514@tpf.co.jp
обсуждение исходный текст
Список pgsql-odbc
Paulo Scardine wrote:
>
> There are many interfaces that doesn't support canceling a long query other
> than killing the application or killing the backend using the server
> operational system.
>
> I've searched the docs, faqs and list archives; seen a lot of questions but
> no answers.
>
> So I hacked a small pggetpid and pgkillpid C functions, and now I can learn
> the backend's PID, start the query in a new thread, and kill the backend
> using another connection if I want. Its ugly, I know, but worked wonderfully
> with ODBC, the Delphi developers here and the users are very happy.
>
> Questions are:
> 1) is there a better way to do that?

Call SQLCancel().

regards,
Hiroshi Inoue
    http://www.geocities.jp/inocchichichi/psqlodbc/

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: SQLBrowseConnect: Invalid string or buffer length
Следующее
От: Hiroshi Inoue
Дата:
Сообщение: Re: Delphi7, ADO, ODBC and PostgreSQL connection problems: