postgresql/src/backend
Peter Eisentraut 04fc2564fb Don't cast pgoff_t to possibly 32-bit types for output
pgoff_t is most likely a 64-bit integer, so casting it to a 32-bit
type for output could lose data.  In the cases addressed here, the
files cannot actually get that large, so this is only cosmetic and to
set better examples for the future.  (Similar issues that could have
actual practical impact were addressed separately in commit
e8f851d6172.)

In one case, the 32-bit size is baked into the protocol, so here we
add an elog and document this discrepancy.

Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/20ce62fa-47fc-457b-b504-12f3c1651726%40eisentraut.org
2026-07-07 11:45:09 +02:00
..
access Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
archive Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
backup Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
bootstrap Rework signal handler infrastructure to pass sender info as argument. 2026-04-15 07:30:34 -04:00
catalog Make property graph object descriptions better translatable 2026-07-03 23:46:19 +02:00
commands Fix properties orphaned by dropping a label 2026-07-05 13:51:32 +02:00
executor Allow logical replication conflicts to be logged to a table. 2026-07-02 08:26:07 +05:30
foreign Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
jit Update JIT tuple deforming code for virtual generated columns 2026-06-19 15:26:18 +12:00
lib Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
libpq Warn on password auth with MD5-encrypted passwords 2026-07-01 20:57:28 +09:00
main Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes IS JSON/JSON(): Protect against expressions uncoercible to text 2026-06-11 16:17:58 +02:00
optimizer Forbid generated columns in FOR PORTION OF 2026-07-06 09:32:09 +02:00
parser Update GROUP BY ALL comments about window functions 2026-07-07 08:47:07 +02:00
partitioning Prevent satisfies_hash_partition from crashing with VARIADIC NULL. 2026-07-06 12:51:29 -04:00
po Translation updates 2026-06-01 12:13:54 +02:00
port Use "grep -E" not "egrep". 2026-05-13 12:07:19 -04:00
postmaster Use placeholders and not GUC names in error message (autovacuum) 2026-06-30 16:16:56 +09:00
regex Harden our regex engine against integer overflow in size calculations. 2026-05-11 05:13:46 -07:00
replication Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
rewrite Disallow renaming a rule to "_RETURN". 2026-07-04 11:34:26 -04:00
snowball Fix meson build of snowball code. 2026-01-05 16:51:36 -05:00
statistics Simplify some stats restore code with InputFunctionCallSafe() 2026-06-30 08:30:08 +09:00
storage Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
tcop Add log_statement_max_length GUC to limit logged statement text 2026-07-03 08:47:18 +09:00
tsearch dict_synonym.c: remove incorrect outlen. 2026-06-08 11:47:53 -07:00
utils Fix mishandling of leading '\' in nondeterministic LIKE. 2026-07-06 14:47:58 -04:00
.gitignore
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
meson.build Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00