git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 8caf96d) | patch
Convert *GetDatum() and DatumGet*() macros to inline functions
2022年9月27日 18:47:07 +0000 (20:47 +0200)
2022年9月27日 18:50:21 +0000 (20:50 +0200)
commit c8b2ef05f481ef06326d7b9f3eb14b303f215c7e
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
27 files changed:
contrib/intarray/_int_gist.c diff | blob | blame | history
doc/src/sgml/xfunc.sgml diff | blob | blame | history
src/backend/access/gist/gistutil.c diff | blob | blame | history
src/backend/tsearch/ts_parse.c diff | blob | blame | history
src/backend/utils/mb/mbutils.c diff | blob | blame | history
src/include/access/gin.h diff | blob | blame | history
src/include/funcapi.h diff | blob | blame | history
src/include/postgres.h diff | blob | blame | history
src/include/tsearch/ts_type.h diff | blob | blame | history
src/include/tsearch/ts_utils.h diff | blob | blame | history
src/include/utils/cash.h diff | blob | blame | history
src/include/utils/date.h diff | blob | blame | history
src/include/utils/expandeddatum.h diff | blob | blame | history
src/include/utils/expandedrecord.h diff | blob | blame | history
src/include/utils/geo_decls.h diff | blob | blame | history
src/include/utils/inet.h diff | blob | blame | history
src/include/utils/jsonb.h diff | blob | blame | history
src/include/utils/jsonpath.h diff | blob | blame | history
src/include/utils/multirangetypes.h diff | blob | blame | history
src/include/utils/numeric.h diff | blob | blame | history
src/include/utils/pg_lsn.h diff | blob | blame | history
src/include/utils/rangetypes.h diff | blob | blame | history
src/include/utils/timestamp.h diff | blob | blame | history
src/include/utils/uuid.h diff | blob | blame | history
src/include/utils/varbit.h diff | blob | blame | history
src/include/utils/xid8.h diff | blob | blame | history
src/include/utils/xml.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /