docs(dump): document --qualify-schema flag (#321)#494
Merged
Conversation
Document the newly shipped `dump --qualify-schema` flag: - Add a --qualify-schema ParamField under Output Options. - Add a "Forced Qualification" subsection under Schema Qualification with motivation (reserved-word ambiguity #320, static analysis), an example showing fully qualified object identifiers, the coverage scope, and a note on the same-schema type-reference limitation (#493). - Mention forced qualification in the Overview. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pg-codex review: the coverage text overpromised by listing index among names emitted as schema.object. CREATE INDEX names stay unqualified (PostgreSQL derives the index schema from its table); only the ON-table target and COMMENT ON INDEX are qualified. - Soften "every object identifier is written as schema.object" to "object names and references ... wherever PostgreSQL syntax permits". - Coverage sentence: drop index from the generic names list and call it out separately as "index targets and comments". - Add a note after the index example clarifying CREATE INDEX names stay unqualified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Documents the existing pgschema dump --qualify-schema flag (introduced in #492) in the dump CLI docs, explaining when and why to use forced schema qualification and clarifying current limitations.
Changes:
- Adds
--qualify-schemato the Output Options parameter list with default/behavior and links to details. - Expands Schema Qualification docs with a new Forced Qualification subsection, including examples, motivations, and a limitation note linking to #493.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- ParamField: drop "wherever PostgreSQL syntax permits" — it implied the type-reference limitation is a syntax restriction, but PostgreSQL does permit qualified type refs; they stay bare because the catalog/IR store in-schema type names without a schema. Reword to name the two actual exceptions (CREATE INDEX names, same-schema type refs) and point to the detail section. Removed the now-redundant trailing "see" line. - Add trailing newline at EOF. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…494) Three accuracy fixes: - ParamField + detail bullet no longer claim schema qualification makes a reserved-word name parse as an identifier (that's quoting, which pgschema applies independently). Reframe the value as unambiguous resolution regardless of search_path, and note reserved words are handled by quoting (e.g. "user"). - Add a note that forced qualification does NOT rewrite free-form SQL text (view definitions, policy USING/WITH CHECK, function/procedure bodies) — so a reference like example.user inside a function body is unaffected by the flag. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the
dump --qualify-schemaflag shipped in #492 (issue #321).Changes (docs-only,
docs/cli/dump.mdx)--qualify-schemaParamField (defaultfalse), linking to the detail section.schema.objectoutput.ON/REFERENCES/OWNED BY/COMMENTtargets. A note clarifies thatCREATE INDEXnames stay unqualified (the index lives in its table's schema).<Note>documenting the same-schema type-reference limitation, tracked in Inspector/IR should preserve schema identity for type references (enable --qualify-schema for types) #493.Notes
REFERENCES, noIF NOT EXISTS) to parallel the smart-qualification example directly above.🤖 Generated with Claude Code