GitPedia
lacanoid

lacanoid/pgddl

DDL eXtractor functions for PostgreSQL (ddlx)

25 Releases
Latest: 10mo ago
CREATE TEMPORARY TABLE0.30LatestPre-release
lacanoidlacanoid·10mo ago·August 28, 2025
GitHub

📋 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
CREATE TYPE0.29Pre-release
lacanoidlacanoid·1y ago·December 5, 2024
GitHub

📋 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
SET COMPRESSION0.28Pre-release
lacanoidlacanoid·1y ago·September 22, 2024
GitHub

📋 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
GRANTED BY0.27Pre-release
lacanoidlacanoid·2y ago·October 20, 2023
GitHub

📋 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
EXECUTE0.26Pre-release
lacanoidlacanoid·2y ago·October 3, 2023
GitHub

📋 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
DEFAULTS0.25Pre-release
lacanoidlacanoid·2y ago·September 17, 2023
GitHub

Release for postgres 16 New `lite` option to move defaults and constraints into `create table` section.

CREATEONLY0.23Pre-release
lacanoidlacanoid·3y ago·June 6, 2023
GitHub

📋 Changes

  • added `ddlx_createonly()` function, to create only pre-data stuff
  • few small fixes and improvements
CREATE OPERATOR CLASS0.22Pre-release
lacanoidlacanoid·4y ago·July 31, 2021
GitHub

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.

CREATE SUBSCRIPTION0.21Pre-release
lacanoidlacanoid·4y ago·July 13, 2021
GitHub

Extensions are now supported. New options: `nodcl`, `noowner`, `nogrants`, `noalter`. Bug fixes.

CREATE TABLE0.20Pre-release
lacanoidlacanoid·5y ago·June 20, 2021
GitHub

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.

CREATE TRIGGER0.19Pre-release
lacanoidlacanoid·5y ago·June 13, 2021
GitHub

Tests on Postgres 14 no longer fail. ddlx_apropos() function now uses POSIX regular expressions.

CREATE EVENT TRIGGER0.18Pre-release
lacanoidlacanoid·5y ago·May 15, 2021
GitHub

A bug in generated create event trigger was fixed. Objects from extensions are now excluded from script unless 'ext' option is specified.

CREATE TRANSFORM0.17Pre-release
lacanoidlacanoid·5y ago·September 11, 2020
GitHub

Improved compatibility with PostgreSQL 13. All tests pass now.

GENERATED AS0.16Pre-release
lacanoidlacanoid·6y ago·November 11, 2019
GitHub

Support for GENERATED columns

CREATE PUBLICATION0.15Pre-release
lacanoidlacanoid·6y ago·October 24, 2019
GitHub

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.

CREATE MATERIALIZED VIEW0.14Pre-release
lacanoidlacanoid·6y ago·August 6, 2019
GitHub

This version improves compatibility with PostgreSQL version 12

CREATE MATERIALIZED0.13Pre-release
lacanoidlacanoid·6y ago·July 30, 2019
GitHub

Another release, which brings a bunch of improvements and bugfixes. See CHANGELOG for more details.

CREATE POLICY0.12Pre-release
lacanoidlacanoid·7y ago·June 19, 2019
GitHub

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.

VACUUM0.11Pre-release
lacanoidlacanoid·7y ago·May 25, 2019
GitHub

📋 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/
CREATE DATABASE0.10Pre-release
lacanoidlacanoid·7y ago·November 24, 2018
GitHub

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.

CREATE SERVER0.9Pre-release
lacanoidlacanoid·8y ago·May 29, 2018
GitHub

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.

CREATE OPERATOR0.8Pre-release
lacanoidlacanoid·8y ago·November 28, 2017
GitHub

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.

CREATE AGGREGATE0.7Pre-release
lacanoidlacanoid·8y ago·July 6, 2017
GitHub

📋 Changes

  • pg_ddl_script() now works for oid and text identifiers
  • support for more object types
  • bug fixes and general code cleanups
CREATE ROLE0.6Pre-release
lacanoidlacanoid·9y ago·June 11, 2017
GitHub

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.

CREATE EXTENSIONv0.5Pre-release
lacanoidlacanoid·9y ago·March 16, 2017
GitHub

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!