Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit965213d

Browse files
committed
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 inuint8. It nevertheless seems weird to not just use 'int', like incommit0f1433f for the backend.Discussion:https://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64%40eisentraut.org
1 parent9d710a1 commit965213d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/interfaces/libpq/fe-protocol3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ getParameterStatus(PGconn *conn)
15321532
staticint
15331533
getBackendKeyData(PGconn*conn,intmsgLength)
15341534
{
1535-
uint8cancel_key_len;
1535+
intcancel_key_len;
15361536

15371537
if (conn->be_cancel_key)
15381538
{

‎src/interfaces/libpq/libpq-int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ struct pg_conn
547547

548548
/* Miscellaneous stuff */
549549
intbe_pid;/* PID of backend --- needed for cancels */
550+
intbe_cancel_key_len;
550551
char*be_cancel_key;/* query cancellation key and its length */
551-
uint16be_cancel_key_len;
552552
pgParameterStatus*pstatus;/* ParameterStatus data */
553553
intclient_encoding;/* encoding id */
554554
boolstd_strings;/* standard_conforming_strings */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp