Skip to content

Add search_path-scoped table scanning - #400

Open
YazeedAlKhalaf wants to merge 1 commit into
go-testfixtures:masterfrom
YazeedAlKhalaf:add-search-paths-support
Open

Add search_path-scoped table scanning#400
YazeedAlKhalaf wants to merge 1 commit into
go-testfixtures:masterfrom
YazeedAlKhalaf:add-search-paths-support

Conversation

@YazeedAlKhalaf

Copy link
Copy Markdown

Adds RestrictTableScanningBySearchPath as a loader option.

When enabled, PostgreSQL metadata discovery and referential-integrity operations are limited to schemas returned by current_schemas(false).

The option uses an internal capability interface so other database helpers can support it later. Unsupported databases return an explicit error.

The default behavior remains unchanged.

Tested with:

  • lib/pq
  • pgx
  • DISABLE TRIGGER
  • ALTER CONSTRAINT
  • DROP CONSTRAINT
  • existing PostgreSQL and CockroachDB tests

I opened this PR based on this issue #399

@YazeedAlKhalaf
YazeedAlKhalaf force-pushed the add-search-paths-support branch from c1b59a5 to d668752 Compare August 4, 2026 22:21
@YazeedAlKhalaf
YazeedAlKhalaf force-pushed the add-search-paths-support branch from d668752 to befeea2 Compare August 4, 2026 22:28
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.

1 participant