postgresql/contrib/sepgsql
Alvaro Herrera 2f9661311b
Represent command completion tags as structs
The backend was using strings to represent command tags and doing string
comparisons in multiple places, but that's slow and unhelpful.  Create a
new command list with a supporting structure to use instead; this is
stored in a tag-list-file that can be tailored to specific purposes with
a caller-definable C macro, similar to what we do for WAL resource
managers.  The first first such uses are a new CommandTag enum and a
CommandTagBehavior struct.

Replace numerous occurrences of char *completionTag with a
QueryCompletion struct so that the code no longer stores information
about completed queries in a cstring.  Only at the last moment, in
EndCommand(), does this get converted to a string.

EventTriggerCacheItem no longer holds an array of palloc’d tag strings
in sorted order, but rather just a Bitmapset over the CommandTags.

Author: Mark Dilger, with unsolicited help from Álvaro Herrera
Reviewed-by: John Naylor, Tom Lane
Discussion: https://postgr.es/m/981A9DB4-3F0C-4DA5-88AD-CB9CFF4D6CAD@enterprisedb.com
2020-03-02 18:19:51 -03:00
..
expected Update sepgsql to add mandatory access control for TRUNCATE 2019-11-23 10:46:44 -05:00
sql Update sepgsql to add mandatory access control for TRUNCATE 2019-11-23 10:46:44 -05:00
.gitignore Minor sepgsql regression test fixes. 2011-02-02 23:46:51 -05:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
database.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dml.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hooks.c Represent command completion tags as structs 2020-03-02 18:19:51 -03:00
label.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
launcher Update copyrights for 2020 2020-01-01 12:21:45 -05:00
proc.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relation.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
schema.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
selinux.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sepgsql-regtest.te Update sepgsql to add mandatory access control for TRUNCATE 2019-11-23 10:46:44 -05:00
sepgsql.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sepgsql.sql.in sepgsql_setcon(). 2012-03-15 16:08:40 -04:00
test_sepgsql Update sepgsql to add mandatory access control for TRUNCATE 2019-11-23 10:46:44 -05:00
uavc.c Move src/backend/utils/hash/hashfn.c to src/common 2020-02-27 09:25:41 +05:30