Add paths of extensions to pg_available_extensions
Andrew Dunstan <andrew@dunslane.net>
Add paths of extensions to pg_available_extensions Add a new "location" column to the pg_available_extensions and pg_available_extension_versions views, exposing the directory where the extension is located. The default system location is shown as '$system', the same value that can be used to configure the extension_control_path GUC. User-defined locations are only visible for super users, otherwise '<insufficient privilege>' is returned as a column value, the same behaviour that we already use in pg_stat_activity. I failed to resist the temptation to do a little extra editorializing of the TAP test script. Catalog version bumped. Author: Matheus Alcantara <mths.dev@pm.me> Reviewed-By: Chao Li <li.evan.chao@gmail.com> Reviewed-By: Rohit Prasad <rohit.prasad@arm.com> Reviewed-By: Michael Banck <mbanck@gmx.net> Reviewed-By: Manni Wood <manni.wood@enterprisedb.com> Reviewed-By: Euler Taveira <euler@eulerto.com> Reviewed-By: Quan Zongliang <quanzongliang@yeah.net>
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/system-views.sgml | modified | +28 −0 |
| src/backend/catalog/system_views.sql | modified | +2 −2 |
| src/backend/commands/extension.c | modified | +85 −24 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +5 −5 |
| src/test/modules/test_extensions/t/001_extension_control_path.pl | modified | +39 −13 |
| src/test/regress/expected/rules.out | modified | +4 −2 |
| src/tools/pgindent/typedefs.list | modified | +1 −1 |