Compatibility release: fixes broken installs on PostgreSQL 11 and 12+, and provides an upgrade path from 0.2.0 and 0.2.1.
cat_tools 0.2.1 (and earlier) only installs correctly on PostgreSQL 9.2 – 10. It fails on newer versions due to catalog schema changes:
-
PG 11:
pg_attributegained theattmissingvalcolumn (pseudo-typeanyarray), which cannot be used as a view column. The 0.2.1 install script’sSELECT a.*frompg_attributepicks this column up and fails. -
PG 12: System catalog
oidcolumns became visible as regular columns. Views usingSELECT c.*alongside an explicitc.oidalias produce duplicate column names.
cat_tools 0.2.2 installs and upgrades correctly on PostgreSQL 9.2 through 18+ (all currently supported versions).
You must upgrade cat_tools to 0.2.2 before upgrading PostgreSQL to version 11 or
later. Upgrade via ALTER EXTENSION cat_tools UPDATE.
cat_tools.column in 0.2.0 and 0.2.1 had extra columns: an unqualified SELECT *
across a LEFT JOIN pg_constraint accidentally pulled in all pg_constraint columns
(conname, contype, etc.). The 0.2.2 upgrade fixes the column list by dropping and
recreating cat_tools.column (and its underlying _cat_tools.column).
If you have created any views, functions, or other objects that depend on
cat_tools.column, you must drop them before upgrading and recreate them
afterward. The upgrade will fail with an error if any such dependent objects
exist — this is intentional, to avoid silently breaking user-defined objects.
After dropping your dependent objects, run ALTER EXTENSION cat_tools UPDATE again.
pg_upgrade physically copies data files and re-applies schema definitions on
the new cluster. Any view that references a catalog column removed in the new
PostgreSQL version will cause the upgrade to fail. The initial 0.2.2 release
omitted oid and attmissingval from the catalog views, but missed several
columns that were later removed from PostgreSQL:
-
relhasoidswas removed frompg_catalog.pg_classin PG12. -
relhaspkeywas removed frompg_catalog.pg_classin PG17. -
attcacheoffwas removed frompg_catalog.pg_attributein PG17.
Without this fix, running pg_upgrade across any of these version boundaries
with cat_tools installed would fail.
You must have the re-release of 0.2.2 installed before running pg_upgrade
to PostgreSQL 12 or later.
-
sql/cat_tools—0.1.4—0.1.5.sqlwas empty; added-- empty upgradeplaceholder so PostgreSQL accepts it as a valid (no-op) upgrade script. -
cat_tools.columnnow exposesattmissingvalastext[](cast fromanyarrayon PG 11+, orNULL::text[]on older versions). AnySELECT *oncat_tools.columnwill now include this column. -
Views rebuilt using
omit_column()to enumerate columns explicitly, avoiding both theanyarrayand duplicate-oidproblems. -
A direct
0.2.0 → 0.2.2upgrade path is provided (cat_tools—0.2.0—0.2.2.sql), which also applies all 0.2.1 function additions in a single step. -
GRANT SELECT ON cat_tools.pg_extension_v TO cat_tools__usageis now applied on the upgrade path from 0.2.0 (it was absent in 0.2.0 and only added via the 0.2.1 upgrade). -
(Re-release)
_cat_tools.pg_class_vnow explicitly omitsrelhasoids(removed in PG12) andrelhaspkey(removed in PG17) to preventpg_upgradefailures. -
(Re-release)
_cat_tools.pg_attribute_vnow explicitly omitsattcacheoff(removed in PG17) to preventpg_upgradefailures.
Fix significant problems with a previous upgrade script.
Add pg_extension_v and related functions.
Add output fields for the table a trigger is on, as well as the function the trigger is using. Based on work done by Luís Lizardo (https://github.com/lizardoluis).
|
Warning
|
This changes the behavior of triggerparse()! You can get the old
behavior by passing the function_arguments output of triggerparse()
through trigger__args_as_text().
|
Add function__arg_types().
Add object type functions (objectcatalog(), objectreg_type(), relation__kind(), relation_relkind()).
Add regprocedure().
=## BUGFIX: Drop pg_temp objects created by extension
It was not possible to actually install 0.1.2 and 0.1.1 because they left temporary objects behind. During session cleanup, the cascade drop of those objects would cascede to the extension itself.