postgresql/src/include/utils
Peter Eisentraut c727f511bd Refactor aclcheck functions
Instead of dozens of mostly-duplicate pg_foo_aclcheck() functions,
write one common function object_aclcheck() that can handle almost all
of them.  We already have all the information we need, such as which
system catalog corresponds to which catalog table and which column is
the ACL column.

There are a few pg_foo_aclcheck() that don't work via the generic
function and have special APIs, so those stay as is.

I also changed most pg_foo_aclmask() functions to static functions,
since they are not used outside of aclchk.c.

Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Reviewed-by: Antonin Houska <ah@cybertec.at>
Discussion: https://www.postgresql.org/message-id/flat/95c30f96-4060-2f48-98b5-a4392d3b6066@enterprisedb.com
2022-11-13 09:02:41 +01:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Refactor aclcheck functions 2022-11-13 09:02:41 +01: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 Use actual backend IDs in pg_stat_get_backend_idset() and friends. 2022-09-29 12:14:39 -04: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
conffiles.h Move code related to configuration files in directories to new file 2022-11-07 12:31:38 +09: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 Add optional parameter to PG_TRY() macros 2022-10-06 10:08:31 +13: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 Replace the sorted array of GUC variables with a hash table. 2022-10-14 12:26:39 -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 Add auxiliary lists to GUC data structures for better performance. 2022-10-14 12:36:14 -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 Remove MemoryContextContains(). 2022-10-06 13:35:31 -04:00
memutils_internal.h Improve our ability to detect bogus pointers passed to pfree et al. 2022-10-06 21:24:00 -04: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 Add repalloc0 and repalloc0_array 2022-11-12 20:34:44 +01:00
partcache.h Resolve partition strategy during early parsing 2022-11-03 16:25:54 +01: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 Add doubly linked count list implementation 2022-11-02 14:06:05 +13: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 Clean up some inconsistencies with GUC declarations 2022-10-31 12:44:48 +09:00
queryenvironment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
queryjumble.h Remove definition of JUMBLE_SIZE from queryjumble.h 2022-10-05 14:27:50 +09: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 Convert macros to static inline functions (rel.h) 2022-10-07 16:16:50 +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 Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04: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 Fix outdated comment in tuplesort.h 2022-11-02 15:29:31 +13: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