Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
От | Tom Lane |
---|---|
Тема | Re: [EXTERNAL] Re: Add non-blocking version of PQcancel |
Дата | |
Msg-id | 372769.1712179784@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [EXTERNAL] Re: Add non-blocking version of PQcancel (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
|
Список | pgsql-hackers |
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > Great, thanks for looking. Pushed now, I'll be closing the commitfest > entry shortly. On my machine, headerscheck does not like this: $ src/tools/pginclude/headerscheck --cplusplus In file included from /tmp/headerscheck.4gTaW5/test.cpp:3: ./src/include/libpq/libpq-be-fe-helpers.h: In function 'char* libpqsrv_cancel(PGconn*, TimestampTz)': ./src/include/libpq/libpq-be-fe-helpers.h:393:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] return "out of memory"; ^~~~~~~~~~~~~~~ ./src/include/libpq/libpq-be-fe-helpers.h:421:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] error = "cancel request timed out"; ^~~~~~~~~~~~~~~~~~~~~~~~~~ The second part of that could easily be fixed by declaring "error" as "const char *". As for the first part, can we redefine the whole function as returning "const char *"? (If not, this coding is very questionable anyway.) regards, tom lane
В списке pgsql-hackers по дате отправления: