Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

pg_dump can dump foreign table schemas

pg_dump will dump foreign tables schemas, but not their data.

$ pg_dump -d db_with_foreign_tables
  name text,
SERVER foreign_server_somewhere
  query 'select * from foreign_users'
Looking for help? Hashrocket developers believe that data quality is as important as code quality. We enjoy all the challenges of relational databases, from finding the fastest index, to structuring data to fit the needs of an application. We're eager to share our experiences; check out PG Casts, our series of free PostgreSQL screencasts.