psql get create table statement code example
Example 1: postgresql create table as select
CREATE TABLE films_recent AS
SELECT * FROM films WHERE date_prod >= '2002-01-01';
Example 2: show create table in postgresql
pg_dump -t 'schema-name.table-name' --schema-only database-name