postgresql/src
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
..
backend Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
bin Don't cast pgoff_t to possibly 32-bit types for output 2026-07-07 11:45:09 +02:00
common Fix mismatched deallocation functions 2026-07-01 13:50:08 +02:00
fe_utils Add comment to describe the various frontend cancel methods 2026-07-06 19:11:04 +03:00
include Remove switch statements in vector8_shift_{left,right}. 2026-07-06 11:40:02 -05:00
interfaces Fix tracing of BackendKeyData and CancelRequest 2026-07-03 14:57:35 +03:00
makefiles Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
pl Make PLy_elog() use pg_integer_constant_p(). 2026-07-06 13:48:42 -04:00
port Use C11 alignas instead of pg_attribute_aligned 2026-07-01 08:36:43 +02:00
template Switch the semaphore API on Solaris to unnamed POSIX. 2026-03-14 14:10:32 -04:00
test Enforce RETURNING typmod on SQL/JSON DEFAULT behavior expressions 2026-07-07 08:27:32 +09:00
timezone Fix macro-redefinition warning introduced by aeb07c55f. 2026-07-01 13:44:45 -04:00
tools Fix qual pushdown past grouping with mismatched equivalence 2026-07-06 16:13:14 +09:00
tutorial Pre-beta mechanical code beautification, step 1: run pgindent. 2026-05-13 10:34:17 -04:00
.gitignore
DEVELOPERS
Makefile Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
Makefile.global.in Update Unicode data to CLDR 48.2 2026-04-13 11:13:36 +02:00
Makefile.shlib Restore AIX support. 2026-02-23 13:34:22 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00