Version 1.6, released 2026-11-19

Enhancements:
- PUBLIC is a first-class grantee: it appears in all "*_permissions"
  views and can be used in "permission_target".
- "permission_diffs()" only examines the roles that appear in
  "permission_target" plus the roles that inherit from them.  Its cost now
  follows the size of the desired state instead of objects x roles x
  privileges (about 10 times faster on a 1000-table, 30-role database),
  and the function is marked STABLE.
- A privilege that a role holds through role membership is no longer
  reported as a surplus grant.
- New "default_acl_target" table, "default_acl_permissions" view and
  "default_acl_diffs()" function to manage ALTER DEFAULT PRIVILEGES.
- "permission_target" now rejects empty permission lists, COLUMN targets
  without a column name, duplicate targets and unknown roles.
- The MAINTAIN privilege is rejected on servers older than 17 instead of
  being silently ignored.
- New "permission_target_snapshot()" adopts the current grants as the
  desired state, so a baseline can be created in one call instead of by
  hand.
- The permission views have a new "source" column that explains why a
  privilege is held: "owner", "direct", "PUBLIC" or "role:<name>" for a
  privilege inherited through role membership.
- New "permission_fix_sql()" returns the GRANT and REVOKE statements that
  would resolve every difference, and "permission_apply()" executes them
  (dry run by default).
- New "permission_diff_summary" view collapses a large diff into one row
  per role, object type, schema and privilege.
- Constraint violations now name the broken rule ("a COLUMN target
  requires column_name", "invalid permission for a COLUMN target:
  {DELETE}") instead of reporting a generic check-constraint failure.
- New "role_drop()" reassigns a role's objects to a successor, revokes
  every privilege granted to it and drops the role, in one transaction.
  "role_dependencies()" reports what still blocks the drop.

Bugfixes:
- Add the missing 1.2 -> 1.3 update script.  A database created with
  version 1.2 could not be upgraded at all, because there was no update
  path from 1.2 to 1.3.
- "permission_target" and "default_acl_target" are no longer writable by
  PUBLIC.  The desired state is a compliance baseline, so only the
  extension owner and roles that are explicitly granted write access may
  change it.  SELECT stays granted to PUBLIC so that "permission_diffs()"
  and "default_acl_diffs()" keep working for everybody.

Behaviour changes:
- "permission_diffs()" no longer reports privileges of roles that do not
  appear in "permission_target" and do not inherit from a role that does.
  Use "all_permissions" for an unfiltered audit.
- The permission views gained a "source" column at the end.  Queries that
  use "SELECT *" will see one more column.
- PostgreSQL 15 or later is required.  Earlier releases are no longer
  supported, because the unique constraint on "permission_target" uses
  "NULLS NOT DISTINCT".

Tests:
- The regression suite is split into "sample", "upgrade", "public",
  "inheritance", "constraints", "default_acl", "usability" and
  "role_drop".
- The upgrade chain from 1.0 to 1.6, including the 1.2 -> 1.3 step and the
  1.5 -> 1.6 migration of "permission_target", is covered.
- The expected output no longer contains sequence values or PL/pgSQL line
  numbers.
- The suite is run against PostgreSQL 15 through 19.

Version 1.5, released 2026-09-19

Bugfixes:
- The "Only the granted column may be updated" guard in the updatable
  views used plain inequality, so a key column that is NULL (such as
  "object_name" of a database or schema row) could be changed unnoticed.
  The comparison now uses "IS DISTINCT FROM".
- The GRANT and REVOKE statements issued by the updatable views now quote
  all identifiers; names that need quoting no longer cause a syntax error
  or silently address the wrong object.
- Updating a row of "function_permissions" that corresponds to a
  procedure failed because "GRANT ... ON FUNCTION" does not work for
  procedures.  The trigger now uses "ROUTINE", which covers functions,
  aggregates, window functions and procedures alike.
- "permission_diffs()" no longer uses a temporary table, so it can be
  called more than once in a single transaction.
- A column privilege that is held at the table level is no longer
  reported as missing by "permission_diffs()", and a table or view level
  target now covers privileges on its columns.
- Partitioned tables and foreign tables are now contained in
  "table_permissions", materialized views in "view_permissions", and
  "column_permissions" covers all of these object types.
- Remove a dead common table expression from "database_permissions".

Version 1.4.1, released 2026-06-29

Enhancements:
- test/: a Dockerfile parameterised by PG_MAJOR plus run-tests.sh and
  run-installcheck.sh to build and run "make installcheck" against every
  supported major version in throwaway containers.  Not-yet-released
  versions (currently 19) are pulled from the pgdg-snapshot repository.
- CI: add PostgreSQL 19 to the regression matrix.
- README: document all of the *_permissions views with worked examples,
  add a desired-vs-actual walkthrough built around permission_diffs() and
  the updatable views, and add a Compliance section relating the extension
  to common regulatory frameworks.

Version 1.4, released 2025-08-04

Bugfixes:
- Match a literal underscore in the "pg\_%" LIKE pattern so that schemas
  whose names merely start with "pg" (such as "pgabc123") are no longer
  mistaken for system schemas and excluded from the views.

Enhancements:
- Add a containerised regression test harness (in "test/") that builds the
  extension and runs "make installcheck" against PostgreSQL 12 through 19,
  pulling not-yet-released versions from the pgdg-snapshot repository.
- Add PostgreSQL 19 to the continuous integration matrix.
- Expand the documentation with worked examples for every "*_permissions"
  view, a walkthrough comparing the desired and actual state with
  "permission_diffs()" and the updatable views, and a section relating the
  extension to common compliance frameworks.

Version 1.3, released 2024-06-12

Enhancements:
- Support the MAINTAINprivilege new in PostgreSQL v17.

Version 1.2, released 2024-02-16

Enhancements:
- Add sequence to "permission_target" for ease of use.

  Idea by Srikanth Medikonda.

Version 1.1, released 2018-12-19

Enhancements:
- Add triggers to the permission views to make them updatable.
  Updating will issue GRANT or REVOKE statements.

  Patch by Antonin Houska.

Bugfixes:
- Rename the "permissions" column of "schema_permissions" and
  "database_permissions" to "permission" to match the other views.

Version 1.0, released 2018-10-18

- first release
