Using the Table DDL View

The DDL (data definition language) view renders the SQL statements necessary to re-create the selected table/view from scratch. It also works if the table is new, or changes are made in the Structure editor. In case of pending changes, the DDL view renders multiple sections:

There are three table views (Content / Structure / DDL). To navigate, select the required table view in the "Navigate" menu or use the segmented button at the bottom. There's also a keyboard shortcut (⌥⌘T) to cycle between the table views.

Interaction with other applications

To copy selected sections to the clipboard, simply use the command "Copy" in the context menu.

Alternatively, you can use the "Save Query…" button to save the whole buffer to a file.

Known Limitations

Not all database features are supported, therefore the rendered SQL is not intended for backups. Instead, please use pg_dump.

For better readability of the rendered SQL, default cases are removed from the rendition:

Looking up PostgreSQL commands

If you have Dash installed, you can use the command "Look Up In Dash" in the context menu or press Ctrl-H to look up the current word (or selection) in Dash.