Skip to content

229 pgc includes temporary session schemas pg temp when using scheme - #233

Merged
nettrash merged 1 commit into
v1.0.25from
229-pgc-includes-temporary-session-schemas-pg_temp_-when-using---scheme
Jul 18, 2026
Merged

229 pgc includes temporary session schemas pg temp when using scheme#233
nettrash merged 1 commit into
v1.0.25from
229-pgc-includes-temporary-session-schemas-pg_temp_-when-using---scheme

Conversation

@nettrash

Copy link
Copy Markdown
Owner

Closes #229

@nettrash nettrash added this to the v1.0.25 milestone Jul 18, 2026
@nettrash nettrash self-assigned this Jul 18, 2026
Copilot AI review requested due to automatic review settings July 18, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #229 by preventing PGC’s schema-resolution step (used by dump/compare/clear) from ever selecting PostgreSQL system/temporary session schemas when --scheme is broad (e.g., %), avoiding invalid create schema pg_temp_N output.

Changes:

  • Updates schema resolution SQL to exclude all pg_-prefixed schemas (covers pg_catalog, pg_toast, pg_temp_*, pg_toast_temp_*) while keeping information_schema excluded.
  • Refactors the schema-resolution query into a dedicated Dump::build_schemas_query() helper for reuse/testing.
  • Adds a unit test asserting the query contains the intended exclusions and updates the CHANGELOG entry for #229.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
CHANGELOG Documents the #229 fix and rationale (exclude pg_-prefixed schemas during schema resolution).
app/src/dump/core.rs Centralizes schema-resolution SQL and applies pg_ prefix exclusion via NOT LIKE 'pg\\_%'.
app/src/dump/core_tests.rs Adds a regression-style test to ensure schema-resolution query excludes pg_ schemas and information_schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nettrash
nettrash merged commit 1b2cde5 into v1.0.25 Jul 18, 2026
16 checks passed
@nettrash
nettrash deleted the 229-pgc-includes-temporary-session-schemas-pg_temp_-when-using---scheme branch July 18, 2026 15:45
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.

2 participants