postgresql/src/include/utils
Michael Paquier 0507977aa4 Introduce pg_attribute_nonnull(...)
pg_attribute_nonnull(...) can be used to generate compiler warnings
when a function is called with the specified arguments set to NULL, as
per an idea from Andres Freund.  An empty argument list indicates that
no pointer arguments can be NULL.  pg_attribute_nonnull() only works for
compilers that support the nonnull function attribute.  If nonnull is
not supported, pg_attribute_nonnull() has no effect.

As a beginning, this commit uses it for the DefineCustomXXXVariable()
functions to generate warnings when the "name" and "value" arguments are
set to NULL.  This will likely be expanded to other places in the
future, where it makes sense.

Author: Nathan Bossart
Reviewed by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/20220525061739.ur7x535vtzyzkmqo@alap3.anarazel.de
2022-07-02 12:30:45 +09:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
aclchk_internal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
array.h Add construct_array_builtin, deconstruct_array_builtin 2022-07-01 11:23:15 +02:00
arrayaccess.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ascii.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
attoptcache.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
backend_progress.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
backend_status.h pgstat: stats collector references in comments. 2022-04-06 13:56:06 -07:00
builtins.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
bytea.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
combocid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
date.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
datetime.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
datum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsa.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dynahash.h Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
elog.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
evtcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandedrecord.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
float.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgrtab.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
formatting.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
freepage.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
geo_decls.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
guc.h Introduce pg_attribute_nonnull(...) 2022-07-02 12:30:45 +09:00
guc_tables.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
help_config.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
hsearch.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
index_selfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inet.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inval.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
json.h SQL JSON functions 2022-03-30 16:30:37 -04:00
jsonb.h SQL JSON functions 2022-03-30 16:30:37 -04:00
jsonfuncs.h SQL/JSON query functions 2022-03-29 16:57:13 -04:00
jsonpath.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
logtape.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lsyscache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memdebug.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memutils.h Improve the generation memory allocator 2022-04-04 20:53:13 +12:00
multirangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
numeric.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
old_snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
palloc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
partcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_crc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_locale.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_lsn.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_rusage.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat_internal.h Remove duplicated words in comments of pgstat.c and pgstat_internal.h 2022-05-24 11:00:41 +09:00
pidfile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
plancache.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
portal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ps_status.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
queryenvironment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
queryjumble.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
rangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
regproc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rel.h Revert changes in HOT handling of BRIN indexes 2022-06-16 15:02:49 +02:00
relcache.h Revert changes in HOT handling of BRIN indexes 2022-06-16 15:02:49 +02:00
relfilenodemap.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relmapper.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
relptr.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
reltrigger.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner_private.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rls.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
ruleutils.h Add public ruleutils.c entry point to deparse a Query. 2022-03-28 11:19:37 -04:00
sampling.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
selfuncs.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
sharedtuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapmgr.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sortsupport.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
spccache.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
syscache.h Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
timeout.h pgstat: store statistics in shared memory. 2022-04-06 21:29:46 -07:00
timestamp.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
tuplesort.h Use Generation memory contexts to store tuples in sorts 2022-04-04 22:52:35 +12:00
tuplestore.h Remove all traces of tuplestore_donestoring() in the C code 2022-02-17 09:52:02 +09:00
typcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tzparser.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
uuid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varbit.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varlena.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
wait_event.h pgstat: store statistics in shared memory. 2022-04-06 21:29:46 -07:00
xid8.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
xml.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00