Mysql – n equivalent of MySQL’s SHOW CREATE TABLE in Postgres

MySQLpostgresqlsql

Is there an equivalent of MySQL's SHOW CREATE TABLE in Postgres? Is this possible? If not what is the next best solution?

I need the statement because I use it to create the table on an remote server (over WCF).

Best Answer

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.

Related Topic