Is it possible to print out a CREATE script for a table?

Among other small goodies, I really miss the CREATE Script feature in pgAdmin, that displays the CREATE query for existing tables, views, pretty much everything. DataGrip let's you modify objects with GUI, but it'll be handy to be able to directly edit the CREATE script instead. Is it possible to print out the create query for an existing table? 


Hello Nick,

From the table context menu please use Copy DDL action to copy DDL of a table to clipboard or Table Editor action to open the Table Editor View and then use switch to DDL tab to view the table definition as SQL script:


Andrey, thanks, but when I use Copy DDL from a view it copies a CREATE TABLE query to the clipboard, while I'm expecting at least CREATE VIEW. It's kinda strange. Is it a bug?


Please sign in to leave a comment.