postgresql/src/include/utils
Peter Eisentraut c8b2ef05f4 Convert *GetDatum() and DatumGet*() macros to inline functions
The previous macro implementations just cast the argument to a target
type but did not check whether the input type was appropriate.  The
function implementation can do better type checking of the input type.

For the *GetDatumFast() macros, converting to an inline function
doesn't work in the !USE_FLOAT8_BYVAL case, but we can use
AssertVariableIsOfTypeMacro() to get a similar level of type checking.

Reviewed-by: Aleksander Alekseev <aleksander@timescale.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/8528fb7e-0aa2-6b54-85fb-0c0886dbd6ed%40enterprisedb.com
2022-09-27 20:50:21 +02:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -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 Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
bytea.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
cash.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02: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 Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
datetime.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
evtcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
expandedrecord.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02: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 Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
freepage.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
geo_decls.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
guc.h Renumber GUC flags for a bit more sanity. 2022-09-27 11:51:06 -04:00
guc_hooks.h Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
guc_tables.h Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -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 Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
inval.h Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
json.h Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonb.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
jsonfuncs.h Revert SQL/JSON features 2022-09-01 17:07:14 -04:00
jsonpath.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
logtape.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lsyscache.h Move common catalog cache access routines to lsyscache.c 2022-08-02 10:47:22 +05:30
memdebug.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memutils.h Improve performance of and reduce overheads of memory management 2022-08-29 17:15:00 +12:00
memutils_internal.h Various cleanups of the new memory context header code 2022-08-31 07:33:54 +12:00
memutils_memorychunk.h Various cleanups of the new memory context header code 2022-08-31 07:33:54 +12:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
multirangetypes.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
numeric.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
old_snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
palloc.h Expand palloc/pg_malloc API for more type safety 2022-09-12 08:45:03 +02: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 Split up guc.c for better build speed and ease of maintenance. 2022-09-13 11:11:45 -04:00
pg_lsn.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
pg_rusage.h Remove configure probe for sys/resource.h and refactor. 2022-08-14 00:09:47 +12:00
pgstat_internal.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
regproc.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07:00
rel.h Support gcc -fkeep-inline-functions 2022-07-15 12:12:30 +02:00
relcache.h Move RelFileNumber declarations to common/relpath.h. 2022-09-27 12:01:57 -04:00
relfilenumbermap.h Include common/relpath.h in utils/relfilenumbermap.h 2022-09-27 13:35:20 -04:00
relmapper.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Fix recent cpluspluscheck issue in selfuncs.h. 2022-09-20 14:08:57 -07:00
sharedtuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapmgr.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
tuplesort.h Harmonize more parameter names in bulk. 2022-09-20 13:09:30 -07: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 Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
varbit.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
varlena.h Adjust assorted hint messages that list all valid options. 2022-09-16 14:53:12 +02:00
wait_event.h Remove the restriction that the relmap must be 512 bytes. 2022-07-26 14:56:25 -04:00
xid8.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00
xml.h Convert *GetDatum() and DatumGet*() macros to inline functions 2022-09-27 20:50:21 +02:00