postgresql/src/include/utils
Tom Lane 9883e3cd1c Fix incorrect message-printing in win32security.c.
log_error() would probably fail completely if used, and would
certainly print garbage for anything that needed to be interpolated
into the message, because it was failing to use the correct printing
subroutine for a va_list argument.

This bug likely went undetected because the error cases this code
is used for are rarely exercised - they only occur when Windows
security API calls fail catastrophically (out of memory, security
subsystem corruption, etc).

The FRONTEND variant can be fixed just by calling vfprintf()
instead of fprintf().  However, there was no va_list variant
of write_stderr(), so create one by refactoring that function.
Following the usual naming convention for such things, call
it vwrite_stderr().

Author: Bryan Green <dbryan.green@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAF+pBj8goe4fRmZ0V3Cs6eyWzYLvK+HvFLYEYWG=TzaM+tWPnw@mail.gmail.com
Backpatch-through: 13
2025-10-13 17:56:45 -04:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Revert MAINTAIN privilege and pg_maintain predefined role. 2023-07-07 11:25:23 -07:00
aclchk_internal.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
array.h Detect integer overflow while computing new array dimensions. 2023-11-06 10:56:43 -05:00
arrayaccess.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
ascii.h Move is_valid_ascii() to ascii.h. 2024-01-29 12:09:03 -06:00
attoptcache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
backend_progress.h Fix CREATE INDEX progress reporting for multi-level partitioning. 2023-03-25 15:34:03 -04:00
backend_status.h Use actual backend IDs in pg_stat_get_backend_subxact(). 2023-08-30 14:47:20 -07:00
builtins.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
bytea.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
cash.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
catcache.h Fix catcache invalidation of a list entry that's being built 2025-01-14 14:41:01 +02:00
combocid.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
conffiles.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
date.h Add back SQLValueFunction for SQL keywords 2023-05-17 10:19:17 +09:00
datetime.h Refactor datetime functions' timezone lookup code to reduce duplication. 2023-03-17 17:47:19 -04:00
datum.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
dsa.h Avoid type cheats for invalid dsa_handles and dshash_table_handles. 2023-01-25 11:48:38 -05:00
dynahash.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
elog.h Fix incorrect message-printing in win32security.c. 2025-10-13 17:56:45 -04:00
evtcache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
expandeddatum.h New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
expandedrecord.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
float.h Doc: improve commentary about providing our own definitions of M_PI. 2023-01-08 16:25:33 -05:00
fmgrtab.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
formatting.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
freepage.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
geo_decls.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
guc.h Fix incorrect file reference in guc.h 2025-09-11 10:15:42 +09:00
guc_hooks.h Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:28 -07:00
guc_tables.h Be more wary about NULL values for GUC string variables. 2023-11-02 11:47:33 -04:00
help_config.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
hsearch.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
index_selfuncs.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
inet.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
inval.h Revert "For inplace update, send nontransactional invalidations." 2024-11-02 09:05:02 -07:00
json.h SQL/JSON: support the IS JSON predicate 2023-03-31 22:34:04 +02:00
jsonb.h SQL/JSON: add standard JSON constructor functions 2023-03-29 12:11:36 +02:00
jsonfuncs.h SQL/JSON: support the IS JSON predicate 2023-03-31 22:34:04 +02:00
jsonpath.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
logtape.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
lsyscache.h Revert "Fix parallel-safety check of expressions and predicate for index builds" 2024-03-07 08:31:00 +09:00
memdebug.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
memutils.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
memutils_internal.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
memutils_memorychunk.h Fix various typos 2023-04-18 13:23:23 +12:00
meson.build meson: Add dependencies to perl modules to various script invocations 2023-06-09 20:12:16 -07:00
multirangetypes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
numeric.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
old_snapshot.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
palloc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
partcache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_crc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_locale.h Update ICU C++ API symbols 2025-08-07 17:14:39 +07:00
pg_lsn.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_rusage.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgstat_internal.h Fix race conditions with drop of reused pgstats entries 2024-11-15 11:32:16 +09:00
pidfile.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
plancache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
portal.h Simplify executor's determination of whether to use parallelism. 2024-12-09 14:38:19 -05:00
ps_status.h Speedup and increase usability of set proc title functions 2023-02-20 16:18:27 +13:00
queryenvironment.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
rangetypes.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
regproc.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
rel.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
relcache.h Document RelationGetIndexAttrBitmap better 2023-08-10 12:04:07 +02:00
relfilenumbermap.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
relmapper.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
relptr.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
reltrigger.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
resowner.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
resowner_private.h bufmgr: Support multiple in-progress IOs by using resowner 2023-04-05 14:17:55 -07:00
rls.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
ruleutils.h pageinspect: Fix gist_page_items() with included columns 2023-05-19 12:37:58 +09:00
sampling.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
selfuncs.h Fix security checks in selectivity estimation functions. 2025-08-11 09:10:17 +01:00
sharedtuplestore.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
snapmgr.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
snapshot.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
sortsupport.h Fix various typos and incorrect/outdated name references 2023-04-19 13:50:33 +12:00
spccache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
syscache.h For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:22 -07:00
timeout.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
timestamp.h Add back SQLValueFunction for SQL keywords 2023-05-17 10:19:17 +09:00
tuplesort.h nbtree: Allocate new pages in separate function. 2023-06-10 14:08:25 -07:00
tuplestore.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
typcache.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
tzparser.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
usercontext.h Perform logical replication actions as the table owner. 2023-04-04 11:25:23 -04:00
uuid.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
varbit.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
varlena.h Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
wait_event.h Sync PG_VERSION file in CREATE DATABASE. 2024-02-01 13:44:22 -08:00
xid8.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
xml.h Support [NO] INDENT option in XMLSERIALIZE(). 2023-03-15 16:59:09 -04:00