Re: Win32 open items
| От | Tom Lane |
|---|---|
| Тема | Re: Win32 open items |
| Дата | |
| Msg-id | 6658.1099160779@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Win32 open items ("Magnus Hagander" <mha@sollentuna.net>) |
| Список | pgsql-patches |
"Magnus Hagander" <mha@sollentuna.net> writes:
> Here is an attempt at this. First patch contains the changes to libpq,
> second patch contains changes to psql to use this API. Docs not updated
> yet, pending approval of the general idea at least :)
I think it would be better to dispense with the PQgetCancelError
function and just make the signature of PQcancel be
int PQcancel(PGcancel *cancel, char *errbuf, int errbuflen);
where errbuf would normally point to a local array in the calling
function.
As-is, PQcancel is itself not thread safe because it is scribbling
on the PGcancel struct. I thought the whole point of this exercise
was to allow multiple threads to use the PGcancel struct; which seems
to me to imply that it had better be read-only to PQcancel.
We don't need the cancelConnLock if this is done properly (at least,
assuming that storing a pointer is atomic, which seems reasonable).
regards, tom lane
В списке pgsql-patches по дате отправления: