Postgres dump specific table with a capital letter Postgres dump specific table with a capital letter postgresql postgresql

Postgres dump specific table with a capital letter


Here is the complete command to dump your table in plain mode:

pg_dump --host localhost --port 5432 --username "postgres" --role "postgres"  --format plain  --file "complete_path_file" --table "schema_name.\"table_name\"" "database_name"

OR you can just do:

pg_dump -t '"tablename"' database_name > data_base.sql

Look to the last page here: Documentation


The above solutions do not work for me under Windows 7 x64. PostgreSQL 9.4.5. But this does, at last (sigh):

-t "cms.\"FooContents\""

either...

pg_dump.exe -p 8888 --username=user -t "cms.\"FooContents\"" basdb

...or...

pg_dump.exe -p 8888 --username=user -table="cms.\"FooContents\"" basdb


Inside a cmd window, I had to put three (!) double quotes around the table name if it countains upper case letters.Examplepg_dump -t """Colors""" database > database.colors.psql