aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-07-02 12:30:45 +0900
committerMichael Paquier <michael@paquier.xyz>2022-07-02 12:30:45 +0900
commit0507977aa4a356052ea0e5da209162e4b2125c1d (patch)
tree2dd3a52187a95d3dbe6854ad9e596bb66cc4206e /src/backend/tcop/postgres.c
parentc99c67fc43f8659517310c62e8a2637d56d0e449 (diff)
downloadpostgresql-0507977aa4a356052ea0e5da209162e4b2125c1d.tar.gz
postgresql-0507977aa4a356052ea0e5da209162e4b2125c1d.zip
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions