mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Use more mundane 'int' type for cancel key lengths in libpq
The documented max length of a cancel key is 256 bytes, so it fits in uint8. It nevertheless seems weird to not just use 'int', like in commit 0f1433f053 for the backend. Discussion: https://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64%40eisentraut.org
This commit is contained in:
parent
9d710a1ac0
commit
965213d9c5
@ -1532,7 +1532,7 @@ getParameterStatus(PGconn *conn)
|
||||
static int
|
||||
getBackendKeyData(PGconn *conn, int msgLength)
|
||||
{
|
||||
uint8 cancel_key_len;
|
||||
int cancel_key_len;
|
||||
|
||||
if (conn->be_cancel_key)
|
||||
{
|
||||
|
@ -547,8 +547,8 @@ struct pg_conn
|
||||
|
||||
/* Miscellaneous stuff */
|
||||
int be_pid; /* PID of backend --- needed for cancels */
|
||||
int be_cancel_key_len;
|
||||
char *be_cancel_key; /* query cancellation key and its length */
|
||||
uint16 be_cancel_key_len;
|
||||
pgParameterStatus *pstatus; /* ParameterStatus data */
|
||||
int client_encoding; /* encoding id */
|
||||
bool std_strings; /* standard_conforming_strings */
|
||||
|
Loading…
x
Reference in New Issue
Block a user