Skip to content

Conversation

NanoBjorn
Copy link

Adds a new --schema-no-create option to pg_dump that allows dumping schema data without generating CREATE SCHEMA statements. When this option is used, the specified schema is automatically included in the dump but the schema creation statement is skipped, allowing data to be imported into existing schemas.

This option is used by the Neon fast import feature (PR #11908) to allow migrations of only objects in certain schemas.

Usage: pg_dump --schema-no-create=schema_name database_name

@MMeent
Copy link

MMeent commented Jun 16, 2025

Can't you just filter CREATE SCHEMA statements from the output?

@MMeent
Copy link

MMeent commented Jun 16, 2025

Unrelated to the above: please use --no-<option-name> instead of --<option>-no-<name>, as that is easier to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants