How can I do a dump of only the table structure in PostgreSQL?

pg_dump --schema-only


If you only want the CREATE TABLE statements, then you can do pg_dump -s databasename | awk 'RS="";/CREATE TABLE[^;]*;/'