How to dump only create table statements (or table definitions only) with pg_dump in Postgresql

by Emilio Platzer   Last Updated October 09, 2019 16:06 PM - source

I want only the table definitions, not wiews nor functions.

I have a schema named "cvp". I try:

    pg_dump --schema-only -n cvp -t 'cvp.*' --format plain

And I get:

pg_dump: No matching tables were found

I try also without -n cvp or changing -t to -t *.* -t cvp.

I'am using PostgreSQL 11.

Related Questions