Skip to content

pg_global_catalog

PostgreSQL global catalog

pg_global_catalog · PostgreSQL global catalog

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101548pg_global_catalogpg_global_catalog0.0.1ADMINPostgreSQLC

Usage

Sources:

pg_global_catalog — PostgreSQL extension to consolidate pg_catalog for each database in a single schema named global_catalog. Use it when administering or automating the database behavior described above. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.

Core Workflow

CREATE EXTENSION pg_global_catalog;

select
datname, count(*)
from global_catalog.pg_class c
join pg_database d
on c.dbid = d.oid
group by datname
order by datname;

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • pggc_create_fdws() is an extension function and returns void.
  • pggc_create_global_views() is an extension function and returns void.

Requirements and Caveats

  • The reviewed control file declares default version 0.0.1.
  • The control file marks the extension as non-relocatable.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader