From 555353c0c59ada35ae59c8a76186e98d123fa8b3 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 14 Feb 2011 16:07:00 -0500 Subject: Rearrange extension-related views as per recent discussion. The original design of pg_available_extensions did not consider the possibility of version-specific control files. Split it into two views: pg_available_extensions shows information that is generic about an extension, while pg_available_extension_versions shows all available versions together with information that could be version-dependent. Also, add an SRF pg_extension_update_paths() to assist in checking that a collection of update scripts provide sane update path sequences. --- doc/src/sgml/catalogs.sgml | 90 +++++++++++++++++++++++++++++++++++++++++----- doc/src/sgml/extend.sgml | 14 ++++++++ 2 files changed, 96 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index e93347992f2..4f7dc6843dc 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -6330,6 +6330,11 @@ available extensions + + pg_available_extension_versions + available versions of extensions + + pg_cursors open cursors @@ -6460,23 +6465,78 @@ - version + default_version text - Version string from the extension's control file + Name of default version, or NULL if none is + specified - installed + installed_version text Currently installed version of the extension, or NULL if not installed - schema + comment + text + Comment string from the extension's control file + + + + + + + The pg_available_extensions view is read only. + + + + + <structname>pg_available_extension_versions</structname> + + + pg_available_extension_versions + + + + The pg_available_extension_versions view lists the + specific extension versions that are available for installation. This view + can only be read by superusers. See also the pg_extension + catalog, which shows the extensions currently installed. + + + + <structname>pg_available_extension_versions</> Columns + + + + + Name + Type + Description + + + + + + name name - Name of the schema where the extension is installed, - or NULL if not installed + Extension name + + + + version + text + Version name + + + + installed + bool + True if this version of this extension is currently + installed @@ -6485,6 +6545,20 @@ True if extension can be relocated to another schema + + schema + name + Name of the schema that the extension must be installed into, + or NULL if partially or fully relocatable + + + + requires + name[] + Names of prerequisite extensions, + or NULL if none + + comment text @@ -6495,9 +6569,9 @@
- The pg_available_extensions view is read only. + The pg_available_extension_versions view is read + only. -
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 6dc42e4ea1b..63a917d3c94 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -765,6 +765,20 @@ SELECT pg_catalog.pg_extension_config_dump('my_config', 'WHERE NOT standard_entr path than to move ahead one version at a time. If the downgrade script drops any irreplaceable objects, this will yield undesirable results. + + + To check for unexpected update paths, use this command: + +SELECT * FROM pg_extension_update_paths('extension_name'); + + This shows each pair of distinct known version names for the specified + extension, together with the update path sequence that would be taken to + get from the source version to the target version, or NULL if + there is no available update path. The path is shown in textual form + with -- separators. You can use + regexp_split_to_array(path,'--') if you prefer an array + format. + -- cgit v1.2.3