Johan Gyllenspetz
Johan Gyllenspetz

Reputation: 344

Ignore specific column on pg_dump/pg_restore

Is it possible to ignore specific columns when dumping a PostgreSQL database using pg_dump? I have a table with columns X and Y. Is it possible to dump only column X with pg_dump?

Upvotes: 15

Views: 7734

Answers (1)

Politank-Z
Politank-Z

Reputation: 3729

Not directly; however, you could

CREATE TABLE b AS SELECT x FROM A;

and then pg_dump that.

Upvotes: 4

Related Questions