aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsvector_parser.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-11-05 13:40:37 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2019-11-05 13:40:37 -0500
commit791864193636764b4cbba0acd2b4eab7581eb2c3 (patch)
tree421fb10db6e32549f2458c0c37cd7accbe5fb4d1 /src/backend/utils/adt/tsvector_parser.c
parenta9db37a180e536dc157aebf5bab4286a0494defc (diff)
downloadpostgresql-791864193636764b4cbba0acd2b4eab7581eb2c3.tar.gz
postgresql-791864193636764b4cbba0acd2b4eab7581eb2c3.zip
Fix "unexpected relkind" error when denying permissions on toast tables.
get_relkind_objtype, and hence get_object_type, failed when applied to a toast table. This is not a good thing, because it prevents reporting of perfectly legitimate permissions errors. (At present, these functions are in fact *only* used to determine the ObjectType argument for acl_error() calls.) It seems best to have them fall back to returning OBJECT_TABLE in every case where they can't determine an object type for a pg_class entry, so do that. In passing, make some edits to alter.c to make it more obvious that those calls of get_object_type() are used only for error reporting. This might save a few cycles in the non-error code path, too. Back-patch to v11 where this issue originated. John Hsu, Michael Paquier, Tom Lane Discussion: https://postgr.es/m/C652D3DF-2B0C-4128-9420-FB5379F6B1E4@amazon.com
Diffstat (limited to 'src/backend/utils/adt/tsvector_parser.c')
0 files changed, 0 insertions, 0 deletions