Metadata Desc
Module:
Each extension comes with several metadata attributes. Below are the descriptions of these attributes:
-
idExtension identifier, an unique integer assigned to each extension for internal sorting.
-
nameExtension name, the name of the extension in the PostgreSQL system catalog, used in
CREATE EXTENSION.Extensions typically come with files like
<name>.control,<name>*.so, and<name>*.sql. -
aliasExtension alias, a normalized name assigned by Pigsty to each extension, usually matching the extension name
name. However, there are exceptions. For example, installing an RPM package that introduces multiple extensions will share a common alias, such aspostgis. -
versionDefault version of the extension, usually the latest version. In some special cases, the available versions in RPM and Debian may slightly differ.
-
categoryExtension category, used to distinguish the type of functionality provided by the extension, such as:
gis,time,rag,fts,olap,feat,lang,type,func,admin,stat,sec,fdw,sim,etl -
tagsTags describing the features of the extension.
-
repoThe source repository of the extension,
CONTRIBmeans it’s a PostgreSQL built-in extension,PGDGdenotes a PGDG first-party extension, andPIGSTYindicates a Pigsty third-party extension. -
langThe programming language used by the extension, usually
C, but there are some written inC++orRust. There are also extensions purely composed of SQL and data. -
need_loadMarked with
Load, meaning the extension uses PostgreSQL hooks, requiring dynamic loading and a PostgreSQL restart to take effect. Only a few extensions need dynamic loading, most are statically loaded. -
need_ddlMarked with
DDL, meaning the extension requires executing DDL statements:CREATE EXTENSION.Most extensions need the
CREATE EXTENSIONDDL statement for creation, but there are exceptions likepg_stat_statementsandwal2json. -
trustedDoes installing this extension require superuser privileges? Or is the extension “trusted” — only providing functions internally within the database.
A few extensions only provide functions internally within the database and thus do not require superuser privileges to install (trusted). Any user with
CREATEprivileges can install trusted extensions. -
relocatableCan the extension be relocated? That is, can it be installed into other schemas? Most extensions are relocatable, but there are exceptions where extensions specify their schema explicitly.
-
schemasIf the extension is relocatable, it can be installed into a specified schema. This attribute specifies the default schema for the extension. PostgreSQL typically allows extensions to use only one schema, but some extensions do not follow this rule, such as
citusandtimescaledb. -
pg_verThe PostgreSQL versions supported by the extension, typically only considering versions within the support lifecycle, i.e., 12 - 16.
-
requiresOther extensions this extension depends on, if any. An extension may depend on multiple other extensions, and these dependencies are usually declared in the
requiresfield of the extension’scontrolfile.When installing an extension, dependencies can be automatically installed with the
CREATE EXTENSION xxx CASCADEstatement. -
pkgExtension package (RPM/DEB) name, using
$vto replace the specific major PostgreSQL version number. -
pkg_verThe version number of the extension package (RPM/DEB), usually consistent with the extension’s version (versionobtained from system views). However, there are rare exceptions where the package version and the extension version are inconsistent or independently managed.
-
pkg_depsThe dependencies of the extension package (RPM/DEB), different from the extension’s dependencies (
requires), here referring to the specific dependencies of the RPM/DEB package. -
urlThe official website or source code repository of the extension.
-
licenseThe open-source license used by the extension, typically
PostgreSQL,MIT,Apache,GPL, etc. -
en_descThe English description of the extension, describing its functions and uses.
-
zh_descThe Chinese description of the extension, describing its functions and uses.
-
commentAdditional comments describing the features or considerations of the extension.
Database Schema
CREATE TABLE IF NOT EXISTS ext.extension
(
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
pkg TEXT NOT NULL,
alias TEXT,
category TEXT,
state TEXT,
url TEXT,
license TEXT,
tags TEXT[],
version TEXT,
repo TEXT,
lang TEXT,
contrib BOOLEAN,
lead BOOLEAN,
has_bin BOOLEAN,
has_lib BOOLEAN,
need_ddl BOOLEAN,
need_load BOOLEAN,
trusted BOOLEAN,
relocatable BOOLEAN,
schemas TEXT[],
pg_ver TEXT[],
requires TEXT[],
rpm_ver TEXT,
rpm_repo TEXT,
rpm_pkg TEXT,
rpm_pg TEXT[],
rpm_deps TEXT[],
deb_ver TEXT,
deb_repo TEXT,
deb_pkg TEXT,
deb_deps TEXT[],
deb_pg TEXT[],
bad_case TEXT[],
extra JSONB,
ctime DATE DEFAULT CURRENT_DATE,
mtime DATE DEFAULT CURRENT_DATE,
en_desc TEXT,
zh_desc TEXT,
comment TEXT
);
COMMENT ON TABLE ext.extension IS 'PostgreSQL Extension Table';
COMMENT ON COLUMN ext.extension.id IS 'Extension Identifier (integer)';
COMMENT ON COLUMN ext.extension.name IS 'Extension Name (in system catalog)';
COMMENT ON COLUMN ext.extension.pkg IS 'Normalized extension package name';
COMMENT ON COLUMN ext.extension.alias IS 'Download pkg group alias';
COMMENT ON COLUMN ext.extension.category IS 'Category of this extension';
COMMENT ON COLUMN ext.extension.state IS 'Extension State (available, deprecated, removed, not-ready)';
COMMENT ON COLUMN ext.extension.url IS 'Extension Repo URL';
COMMENT ON COLUMN ext.extension.license IS 'Extension License';
COMMENT ON COLUMN ext.extension.tags IS 'Extra tags';
COMMENT ON COLUMN ext.extension.version IS 'the latest available version of this extension';
COMMENT ON COLUMN ext.extension.lang IS 'Programming Language of this extension';
COMMENT ON COLUMN ext.extension.lead IS 'Mark the primary extension among one multi-ext package';
COMMENT ON COLUMN ext.extension.has_bin IS 'does this extension has binary utils';
COMMENT ON COLUMN ext.extension.has_lib IS 'Does the extension have shared library?';
COMMENT ON COLUMN ext.extension.need_ddl IS 'Extension need `CREATE EXTENSION` to work?';
COMMENT ON COLUMN ext.extension.need_load IS 'Require LOAD & shared_preload_libraries to work?';
COMMENT ON COLUMN ext.extension.trusted IS 'A Trusted extension does not require superuser to work';
COMMENT ON COLUMN ext.extension.relocatable IS 'Can this extension be relocated?';
COMMENT ON COLUMN ext.extension.schemas IS 'Installed Schema, if not relocatable';
COMMENT ON COLUMN ext.extension.pg_ver IS 'Supported PostgreSQL major versions';
COMMENT ON COLUMN ext.extension.requires IS 'Dependencies of this extension';
COMMENT ON COLUMN ext.extension.rpm_pkg IS 'RPM package name, major version is replace with $v';
COMMENT ON COLUMN ext.extension.deb_pkg IS 'DEB package name, major version is replace with $v';
COMMENT ON COLUMN ext.extension.en_desc IS 'English description';
COMMENT ON COLUMN ext.extension.zh_desc IS 'Chinese description';
COMMENT ON COLUMN ext.extension.comment IS 'Extra information';
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.