Is there an equivalent of MySQL’s SHOW CREATE TABLE in Postgres?

You can try to trace in the PostgreSQL log file what pg_dump --table table --schema-only really does. Then you can use the same method to write your own sql function.

Leave a Comment