lacanoid/pgddl
DDL eXtractor functions for PostgreSQL (ddlx)
📋 Changes
- added support for virtual generated columns on Postgres 18
- grants to roles now support `INHERIT` and `SET` options on Postgres 16
- removed function `ddlx_grants(regclass)` as it now handled by `ddlx_grants(oid)`
- `ddlx_grants(oid)` fixes, now handles materialized views too.
- added `data` option to attempt to preserve table data
- added `noindexes` option to omit indexes
- added `grantor` option to show `GRANTED BY` which is now ommited by default
- added support for missing tsearch mappings in `pg_ts_config_map`
- + 2 more
📋 Changes
- improvements in ddlx_create_subscription(), support for new options
- improvements in ddlx_script_parts(), better handling of extensions
- bug fixes in ddlx_create_type_range(), MULTIRANGE_TYPE_NAME support
- bug fixes in SET COMPRESSION
- bug fixes in GRANTED BY
📋 Changes
- column compression support with ALTER COLUMN SET COMPRESSION
- use correct routine type in ddlx_grants()
- test updates for Postgres 17
- fixed bug with duplicate foreign key constraints for self referencing tables
- few more functions have comments
📋 Changes
- include `GRANTED BY` when grantor is distinct from current role
- include table partitions in a script, `nopartitions` option to omit
- new `nocomments` option to hide all comments
- new `comments` option to show all comments, even null ones
- more execute tests
- bug fixes in script order, now much better!
- bug fixes in `GENERATED` columns
- improved `CREATE TYPE` for base types, shell types support
- + 4 more
📋 Changes
- added new `lite` option, which moves defaults and constraints into `create table` section and removes some postgres specific things (such as settings and storage)
- `nowrap` option for scripts to omit begin/end
- `nostorage` option to omit storage settings
- `nosettings` option to omit settings
- `notriggers` option to omit triggers
- added 'CREATE SEQUENCE'+'ALTER SEQUENCE' for owned sequences
- new execute tests which actually runs generated scripts
- updated tests for postgres 16
- + 1 more
Release for postgres 16 New `lite` option to move defaults and constraints into `create table` section.
📋 Changes
- added `ddlx_createonly()` function, to create only pre-data stuff
- few small fixes and improvements
Objects from `pg_amop` and `pg_amproc` now handled by `create_operator_class()`. New option `nodrop` to omit drop statements alltogether. Bug fixes with respect to partitions, where too many constraint/indexes were dumped.
Extensions are now supported. New options: `nodcl`, `noowner`, `nogrants`, `noalter`. Bug fixes.
New option `ie` will add `IF EXISTS` to a bunch of places. New option `ine` will add `IF NOT EXISTS` to a bunch of places. New option `drop` will add drop statements in the beginning of the script. One can pass options as text array to `ddlx_create` and `ddlx_script` and other functions. Like: ``` mydb=# select ddlx_create('my_table'::regclass , '{ine}') ``` Now one can get individual parts of object definition. Try: ``` mydb=# select * from ddlx_definitions('my_table'::regclass) ``` Some internal factorization to make this more sensible.
Tests on Postgres 14 no longer fail. ddlx_apropos() function now uses POSIX regular expressions.
A bug in generated create event trigger was fixed. Objects from extensions are now excluded from script unless 'ext' option is specified.
Improved compatibility with PostgreSQL 13. All tests pass now.
Support for GENERATED columns
This version has been tested to work with PostgreSQL 12 and test have been adjusted to pass. Publications and subscriptions are now supported. New ddlx_apropos() function lets you conveniently search for stuff. Bugs have been fixed.
This version improves compatibility with PostgreSQL version 12
Another release, which brings a bunch of improvements and bugfixes. See CHANGELOG for more details.
Another spring release! This version adds support for a number of features, including partitions, policies (row level security), clustering, disabled triggers, statistics and operator classes.
📋 Changes
- support for column grants
- support for fdw options on columns
- function ddlx_get_dependants_recursive() rolled into ddlx_get_dependants()
- removed column 'kind' from ddlx_identify()
- bug fix in create enum
- published on PGXN https://pgxn.org/dist/ddlx/
New fall release! No naming changes this time :) The extension now installs and runs on different PostgreSQL versions, tested from version 9.1 on. This version adds support for many new objects, including databases, languages, transforms, rules and tablespaces. Few bugs have been fixed. Regression tests were extended and improved.
New spring release! This time, the extension name itself has been changed to `ddlx`. Also, the API has been changed to use just `ddlx_` for function prefixes. Hopefully this is final and makes things more consistent and shorter to type. Now you can just `select ddlx_script('tablename')`! Support has been added for a bunch of objects. There is now support for all `reg*` types, including text search. Also for more SQL standard stuff, like foreign data wrappers, servers, user mappings, casts, collations and conversions. Bugs were fixed. Regression tests were extended and improved.
API has been renamed to use `pg_ddlx` prefix, as in DDL eXtractor! This keeps the API neatly in one place in functions browser. Public API has been extended with `pg_ddlx_create(oid)` and `pg_ddlx_drop(oid)` functions. Added support for operators. Initial support for dependancies.
📋 Changes
- pg_ddl_script() now works for oid and text identifiers
- support for more object types
- bug fixes and general code cleanups
New release supports extracting DDL for roles (users and groups). Also, range types are supported, as are collations on domains. This further enhances support for types, making it more complete.
Since this is apparently being used by some people, it might make sense to make a release, so that I can see how this works. Also that the work can continue on the next version. Some of the stuff on the roadmap has been implemented recently and stupid bugs fixed. Enjoy, and please report all issues in the issue tracker. Thanks!
