postgresql/src/interfaces/libpq
Jacob Champion 8934f2136c Add pg_add_size_overflow() and friends
Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
2025-11-24 09:59:38 -08:00
..
po Translation updates 2025-05-05 12:04:49 +02:00
t Simplify newline handling in two TAP tests 2025-10-28 08:26:42 +09:00
test meson: Add missing dependencies for libpq tests 2025-02-04 17:56:19 -05:00
.gitignore Run tap tests in src/interfaces/libpq. 2022-02-26 16:51:47 -08:00
exports.txt libpq: Remove PQservice() 2025-07-09 12:46:13 +09:00
fe-auth-oauth.c oauth: Limit JSON parsing depth in the client 2025-05-23 13:05:33 -07:00
fe-auth-oauth.h oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
fe-auth-sasl.h libpq: Handle asynchronous actions during SASL 2025-02-06 22:19:21 +01:00
fe-auth-scram.c Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe-auth.c Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
fe-auth.h Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
fe-cancel.c libpq: Complain about missing BackendKeyData later with PGgetCancel() 2025-08-01 18:24:19 +03:00
fe-connect.c libpq: Prevent some overflows of int/size_t 2025-11-10 06:20:33 -08:00
fe-exec.c Add pg_add_size_overflow() and friends 2025-11-24 09:59:38 -08:00
fe-gssapi-common.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe-gssapi-common.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe-lobj.c libpq: Deprecate pg_int64. 2025-03-25 21:40:00 +13:00
fe-misc.c Don't reduce output request size on non-Unix-socket connections. 2025-06-10 18:39:34 -04:00
fe-print.c Add pg_add_size_overflow() and friends 2025-11-24 09:59:38 -08:00
fe-protocol3.c Add pg_add_size_overflow() and friends 2025-11-24 09:59:38 -08:00
fe-secure-common.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe-secure-common.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe-secure-gssapi.c Use SOCK_ERRNO[_SET] in fe-secure-gssapi.c. 2025-10-05 16:27:47 -04:00
fe-secure-openssl.c Fix typo 2025-11-18 19:31:23 +01:00
fe-secure.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe-trace.c libpq: Fix PQtrace() format for non-printable characters 2025-09-03 12:54:23 +09:00
legacy-pqsignal.c Avoid symbol collisions between pqsignal.c and legacy-pqsignal.c. 2025-01-14 18:50:24 -05:00
libpq-events.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq-events.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq-fe.h Move pg_int64 back to postgres_ext.h 2025-09-16 10:48:56 +02:00
libpq-int.h libpq: Prevent some overflows of int/size_t 2025-11-10 06:20:33 -08:00
Makefile Don't put library-supplied -L/-I switches before user-supplied ones. 2025-07-29 15:17:40 -04:00
meson.build oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
nls.mk oauth: Move the builtin flow into a separate module 2025-05-01 09:14:30 -07:00
pg_service.conf.sample Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
pqexpbuffer.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
pqexpbuffer.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pthread-win32.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
README Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win32.c Update copyright for 2025 2025-01-01 11:21:55 -05:00
win32.h Recognize network-failure errnos as indicating hard connection loss. 2020-10-10 13:28:12 -04:00

src/interfaces/libpq/README

This directory contains the C version of Libpq, the POSTGRES frontend library.