DDL eXtractor functions for PostgreSQL (ddlx)
This release contains a lot of improvements and bugfixes and is recommended for all users.
Changes include:
GRANTED BY
when grantor is distinct from current rolenopartitions
option to omitnocomments
option to hide all commentscomments
option to show all comments, even null onesGENERATED
columnsCREATE TYPE
for base types, shell types supportlite
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/endnostorage
option to omit storage settingsnosettings
option to omit settingsnotriggers
option to omit triggersRelease for postgres 16
New lite
option to move defaults and constraints into create table
section.
ddlx_createonly()
function, to create only pre-data stuffObjects 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.