meta
pg_meta : Normalized, friendlier system catalog for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6430 | meta
|
pg_meta
|
0.4.0 |
STAT
|
BSD 2-Clause
|
SQL
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
----d--
|
No
|
No
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Schemas | meta |
| See Also | pg_profile
pg_tracing
pg_show_plans
pg_stat_kcache
pg_stat_monitor
pg_qualstats
pg_store_plans
pg_track_settings
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.4.0 |
18
17
16
15
14
|
pg_meta |
- |
| RPM | PIGSTY
|
0.4.0 |
18
17
16
15
14
|
pg_meta_$v |
- |
| DEB | PIGSTY
|
0.4.0 |
18
17
16
15
14
|
postgresql-$v-pg-meta |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
el8.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
el9.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
el9.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
el10.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
el10.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
d12.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
d12.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
d13.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
d13.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
u22.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
u22.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
u24.x86_64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
u24.aarch64
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
PIGSTY 0.4.0
|
Source
pig build pkg pg_meta; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_meta; # install via package name, for the active PG version
pig install meta; # install by extension name, for the current active PG version
pig install meta -v 18; # install for PG 18
pig install meta -v 17; # install for PG 17
pig install meta -v 16; # install for PG 16
pig install meta -v 15; # install for PG 15
pig install meta -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION meta;Usage
meta provides a normalized, human-friendly system catalog with common names for views and columns, sitting on top of pg_catalog and information_schema.
System Catalog Views
The extension creates approximately 30 views in the meta schema:
-- List all tables
SELECT * FROM meta.table;
-- List all columns
SELECT * FROM meta.column;
-- List all views
SELECT * FROM meta.view;
-- List schemas
SELECT * FROM meta.schema;
-- List functions
SELECT * FROM meta.function;
-- List extensions
SELECT * FROM meta.extension;
-- List triggers
SELECT * FROM meta.trigger;
-- List foreign keys
SELECT * FROM meta.foreign_key;
-- List constraints
SELECT * FROM meta.constraint_check;
SELECT * FROM meta.constraint_unique;
-- List types
SELECT * FROM meta.type;
-- List roles
SELECT * FROM meta.role;
-- List sequences
SELECT * FROM meta.sequence;
-- List operators
SELECT * FROM meta.operator;
-- List policies
SELECT * FROM meta.policy;Available Views
cast, column, connection, constraint_check, constraint_unique, extension, foreign_column, foreign_data_wrapper, foreign_key, foreign_server, foreign_table, function, function_parameter, operator, policy, policy_role, relation, relation_column, role, role_inheritance, schema, sequence, table, table_privilege, trigger, type, view
Meta-Identifiers
The extension provides composite types that serve as “soft” primary keys to identify PostgreSQL objects by name (tables, columns, types, etc.) rather than by OID.
Catalog Triggers (Optional)
With the optional meta_triggers extension, views become updatable, enabling DDL via DML:
-- Create a table via INSERT
INSERT INTO meta.table (schema_name, name) VALUES ('public', 'foo');