cat_tools
cat_tools : Tools for interfacing with the PostgreSQL catalog
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| ----d-- | No | No | No | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | cat_tools |
| Requires | plpgsql |
| Need By | extension_drop object_reference |
| See Also | pg_catalog_get_defs pg_global_catalog meta_triggers pg_catcheck pgdd ddlx meta object_reference |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.3.0 |
18 17 16 15 14 | cat_tools |
plpgsql |
| RPM | PIGSTY | 0.3.0 |
18 17 16 15 14 | cat_tools_$v |
- |
| DEB | PIGSTY | 0.3.0 |
18 17 16 15 14 | postgresql-$v-cat-tools |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el8.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el9.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el9.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el10.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| el10.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d12.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d12.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d13.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| d13.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u22.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u22.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u24.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u24.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u26.x86_64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
| u26.aarch64 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 | PIGSTY 0.3.0 |
Source
github.com/Postgres-Extensions/cat_tools
cat_tools-0.3.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
- cat_tools 0.3.0 README
- cat_tools 0.3.0 history
- cat_tools 0.3.0 control file
- cat_tools 0.3.0 install SQL
cat_tools provides typed views, enums, and helper functions for PostgreSQL catalog introspection. It is designed for database code that needs a more stable and readable interface than repeatedly decoding raw pg_catalog fields; the views still track PostgreSQL’s catalogs and must be reviewed across major-version upgrades.
Install and Grant Access
The extension installs in the fixed cat_tools schema, requires plpgsql, and is not relocatable. Grant the cat_tools__usage role rather than exposing internal _cat_tools helpers directly.
Inspect Relations and Columns
Useful relation helpers include pg_class(regclass), relation__is_catalog, relation__is_temp, relation__kind, and relation__relkind. Typed mapping functions make the one-character catalog codes explicit.
Inspect Routines
Version 0.3 adds functions and types that cover both functions and procedures:
The routine surface includes routine__parse_arg_types, routine__parse_arg_names, routine__arg_types, routine__arg_names, their text variants, and mappings for routine kind, argument mode, volatility, and parallel safety. function__arg_types and function__arg_types_text are deprecated; use the routine parsers.
Version 0.3.0 and Caveats
- Version 0.3.0 supports PostgreSQL 12-18+ upstream; current Pigsty packages cover PostgreSQL 14-18.
- The release corrects the
c,f, andmmappings for composite types, foreign tables, and materialized views. Re-test any code that worked around the old mapping. - Internal
_cat_toolshelpers now revokeEXECUTEfromPUBLIC; callers should inheritcat_tools__usageand use the supported surface. - The 0.2.3-to-0.3.0 update adds enum values and therefore cannot run on PostgreSQL 11 or earlier. Upgrade the database major version and extension in the order documented upstream.
- PostgreSQL does not promise catalog compatibility across major releases. Pin tests to every supported PostgreSQL major even when using these wrappers.