Repository navigation
docs: clarify schema discovery for dbListTables - #583
LeonidasZhak wants to merge 2 commits into
Conversation
4ef8962 to
5c31346
Compare
5c31346 to
7506a94
Compare
|
I checked the failed |
* chore: Review #583 [ci skip] Records the review of #583 on its PR. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc * docs: clarify schema table discovery * style: wrap schema cleanup call * docs: Show the schema example once and say that `search_path` replaces the path Keeps the full example in `?postgres-tables` only and links to it from `?Postgres`. The `search_path` example keeps `public`, quotes the schema with `dbQuoteIdentifier()`, and the claim stays out of the `...` parameter that `?Redshift` inherits. The example creates a schema with a unique name and removes only what it created. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc * test: Slim the schema listing test Cleans up with `withr::defer()`, creates a uniquely named schema without a preceding `DROP`, and removes only what it created, so the test prints no server notices. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc * docs: Name the servers that need `SET search_path` and test the `public` form Says that `dbListTables()` skips `pg_catalog`, and covers `search_path=<schema>,public` in the test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hr1rd6e5NcxC9GSrNJDokc --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Leonidas Zhak <[email protected]>
|
Thanks! Expanded and merged with attribution in #583. |
|
Thank you for picking up #399, and sorry for the slow reply! The content was accurate, so I took your two commits, with you as their author, into #675 and made a few changes on top:
The Generated by Claude Code |
Summary
Clarify how to discover tables in a non-default schema, both by listing objects with
Id(schema = ...)and by usingoptions = "-c search_path=..."for a connection.Thanks to maintainers
Thanks for the pointers in #399 and for the existing schema-qualified table examples.
Issue or motivation
Issue #399 notes that users looking for tables in a specific schema do not easily find the supported workflows.
Root cause
The connection docs only pointed readers to the general libpq options reference, and the table docs showed schema-qualified writes without showing the matching schema-scoped listing patterns.
Change
options = "-c search_path=..."in thedbConnect()docs with a runnable exampledbListObjects(con, Id(schema = ...))anddbListTables()on a connection withsearch_pathsetsearch_pathworkflowTests
devtools::document()UserNM=true R CMD INSTALL .devtools::test(filter = "dbConnect")rcmdcheck::rcmdcheck(args = c("--no-manual", "--ignore-vignettes"), error_on = "note")pkgdown::build_site(preview = FALSE)Scope
I did not change
dbListTables()behavior or add a new schema argument. This PR only documents the existing workflows and adds a focused regression test for the documented connection-option path.