Re: Buggy SELEC ... FROM UPDATE ?

Поиск
Список
Период
Сортировка
От Helge Bahmann
Тема Re: Buggy SELEC ... FROM UPDATE ?
Дата
Msg-id Pine.LNX.4.21.0104101731180.13990-100000@lothlorien.stunet2.tu-freiberg.de
обсуждение исходный текст
Ответ на Buggy SELEC ... FROM UPDATE ?  (Patrice Espié <patrice.espie@univ-lyon2.fr>)
Список pgsql-novice
On Tue, 10 Apr 2001, Patrice Espié wrote:

> > > Sure, I want to release it : the other users MUST be free to go away
> instead
> > > of being locked if they try to lock anything already locked
> > A solution I have implemented once is to use an application-side timer
> > to cancel the request after a certain timeout; ugly, but doable. What
> > interface to postgres do you use?
> Doable...
> I use ODBC under Windows, but why not the C or C++ interface ? I will use
> the most efficient (if I can decide which one...)
uhh... I know nothing about Windows, but on Unix and libpq you would
simply use alarm(timeout) to initiate the timer and
sigaction(SIGALRM,...) to install a handler for the timer event which can
in turn call PQrequestCancel; I guess Windows and ODBC can't be too
different, but you better ask someone who knows Windows a bit better

note that the current transaction is in 'aborted' state when you cancel a
request, so you will have to "rollback" and "begin" a new one before
sending any other queries

hope that helps


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

Предыдущее
От: manoj garg
Дата:
Сообщение: how to run postgre on winNT
Следующее
От: Patrice Espié
Дата:
Сообщение: Re: Buggy SELEC ... FROM UPDATE ?