Synthesize CREATE/ALTER DDL from the current state of a live database. PostgreSQL stores only the parsed representation of DDL statements. This namespace reverse-engineers the effective DDL from the system catalogs.
Synthesize CREATE/ALTER DDL from the current state of a live database. PostgreSQL stores only the parsed representation of DDL statements. This namespace reverse-engineers the effective DDL from the system catalogs.
(ddl-for-function db schema fn)Return the CREATE OR REPLACE FUNCTION/PROCEDURE statement for a function (or procedure) in a schema. Matches by function name; for overloaded functions this returns the first match. TODO
Return the CREATE OR REPLACE FUNCTION/PROCEDURE statement for a function (or procedure) in a schema. Matches by function name; for overloaded functions this returns the first match. TODO
(ddl-for-table db schema table)Return the CREATE TABLE statement for a table in a schema.
Return the CREATE TABLE statement for a table in a schema.
(ddl-for-view db schema view)Return the CREATE [MATERIALIZED] VIEW statement for a view in a schema.
Return the CREATE [MATERIALIZED] VIEW statement for a view in a schema.
(generate-ddl db
&
{:keys [include-system-objects? schemas]
:or {include-system-objects? false}})Generate a full-database DDL script as a single string, composed in dependency order (tables -> constraints -> indexes -> views -> functions -> triggers -> rules -> comments).
Options: :include-system-objects? emit pg_catalog/information_schema objects (default false) :schemas restrict output to a vector of schema names
Generate a full-database DDL script as a single string, composed in dependency order (tables -> constraints -> indexes -> views -> functions -> triggers -> rules -> comments). Options: :include-system-objects? emit pg_catalog/information_schema objects (default false) :schemas restrict output to a vector of schema names
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |