Skip to content

Comments

Maintenance: Remove doc as database name across the board#517

Merged
amotl merged 1 commit intomainfrom
connect-without-database
Dec 26, 2025
Merged

Maintenance: Remove doc as database name across the board#517
amotl merged 1 commit intomainfrom
connect-without-database

Conversation

@amotl
Copy link
Member

@amotl amotl commented Dec 25, 2025

About

The default CrateDB database is called crate.
doc is certainly wrong (default schema name), so let's remove it.

Synopsis

-postgresql://<user>:<password>@<cluster>.cratedb.net:5432/doc
+postgresql://<user>:<password>@<cluster>.cratedb.net:5432/

Thoughts

If we would use crate instead, it would add more crate noise, and also suggest that the reader may use a different database name instead, which currently is not possible. So, the only viable conclusion is to remove it, unless there are different proposals.

References

The default CrateDB database is called `crate`.
`doc` is certainly wrong (default schema name), so let's remove it.

If we would use `crate` instead, it would add more `crate` noise,
and also suggest that the reader may use a different database name
instead, which currently is not possible.

So, the only viable conclusion is to remove it,
unless there are different proposals.
@amotl amotl requested review from seut and surister December 25, 2025 18:17
@amotl amotl added the sanding-1200 Fine sanding. label Dec 25, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 25, 2025

Walkthrough

This PR removes the Database or database name parameter from connection string examples across six programming language documentation files (C#, Elixir, Erlang, F#, R, and Visual Basic), allowing connection examples to proceed without specifying a default database.

Changes

Cohort / File(s) Summary
Database Parameter Removal from Connection Examples
docs/connect/csharp/index.md, docs/connect/elixir/index.md, docs/connect/erlang/epgsql.md, docs/connect/fsharp/index.md, docs/connect/r/index.md, docs/connect/visualbasic/index.md
Removed database specification (e.g., Database=doc, database: "doc", dbname = "doc") from connection string/configuration examples across multiple languages; two instances updated per file

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

maintenance

Suggested reviewers

  • seut
  • surister
  • kneth

Poem

🐰 The docs hop lighter now, so spry,
No database paths to specify,
Six languages freed from the "doc" constraint,
Connection examples now feel great!
One parameter less, the examples sing!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Maintenance: Remove doc as database name across the board' directly and clearly summarizes the main change—removing the incorrect 'doc' database parameter from connection examples across multiple documentation files.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale (doc is the wrong default schema name, not the database), providing concrete before/after examples, and referencing the related issue (GH-475).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch connect-without-database

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d6b9214 and 893db3c.

📒 Files selected for processing (6)
  • docs/connect/csharp/index.md
  • docs/connect/elixir/index.md
  • docs/connect/erlang/epgsql.md
  • docs/connect/fsharp/index.md
  • docs/connect/r/index.md
  • docs/connect/visualbasic/index.md
💤 Files with no reviewable changes (3)
  • docs/connect/erlang/epgsql.md
  • docs/connect/elixir/index.md
  • docs/connect/r/index.md
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: amotl
Repo: crate/cratedb-guide PR: 406
File: docs/connect/go.md:110-137
Timestamp: 2025-10-20T21:49:18.785Z
Learning: In the cratedb-guide repository, documentation examples for connecting to CrateDB (e.g., Go examples in docs/connect/go.md) should be kept minimal and focused on demonstrating basic functionality, rather than including comprehensive error handling. Full examples with proper error handling are maintained separately in the cratedb-examples repository.
Learnt from: bmunkholm
Repo: crate/cratedb-guide PR: 340
File: docs/home/index.md:84-97
Timestamp: 2025-09-25T19:31:54.320Z
Learning: In the CrateDB Guide docs (MyST), the CrateDB Cloud card on the homepage should link to `getting-started` using `:link-type: ref` instead of the previous `cloud:index` intersphinx target. This change was implemented in PR #340 to direct users to the getting started section rather than directly to the Cloud documentation.
Learnt from: amotl
Repo: crate/cratedb-guide PR: 465
File: docs/admin/troubleshooting/system-tables.md:6-6
Timestamp: 2025-10-30T23:12:30.204Z
Learning: In the cratedb-guide repository, documentation headers and titles should use sentence case (e.g., "Diagnostics with system tables") rather than title case (e.g., "Diagnostics with System Tables"). This style choice enables headers to be referenced more fluently within sentences.
Learnt from: amotl
Repo: crate/cratedb-guide PR: 263
File: docs/integrate/kafka/docker-python.md:112-120
Timestamp: 2025-08-22T18:11:12.776Z
Learning: In documentation and tutorial repositories like cratedb-guide, code examples should prioritize simplicity, clarity, and educational value over production-ready features. Comprehensive error handling, extensive validation, and other production concerns can distract from the main learning objectives and make examples harder to follow. Review suggestions should focus on correctness and clarity rather than production hardening.
Learnt from: amotl
Repo: crate/cratedb-guide PR: 249
File: docs/ingest/etl/index.md:30-31
Timestamp: 2025-08-14T11:40:39.584Z
Learning: In the CrateDB Guide documentation, the project policy is to prune ALL legacy aliases (like `(apache-airflow)=`, `(aws-*)=`) and fix forward if anything breaks, rather than maintaining backward compatibility with dual anchors.
Learnt from: amotl
Repo: crate/cratedb-guide PR: 408
File: docs/connect/elixir.md:18-22
Timestamp: 2025-10-16T10:58:18.401Z
Learning: When connecting to CrateDB using PostgreSQL-compatible drivers like Postgrex (Elixir), the `database` parameter handling may differ from standard PostgreSQL usage because CrateDB has no notion of databases like PostgreSQL does. CrateDB uses schemas to separate concerns instead. The `database` parameter might need to be omitted or handled differently to avoid connection issues.
📚 Learning: 2025-10-19T19:21:49.864Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 420
File: docs/connect/erlang.md:100-113
Timestamp: 2025-10-19T19:21:49.864Z
Learning: In the cratedb-guide repository, when documenting cloud or alternative connection methods, show only the differences from the canonical example (e.g., SSL configuration) rather than repeating the entire workflow (query execution, cleanup, etc.). This pattern is used consistently across pages to avoid repetition.

Applied to files:

  • docs/connect/csharp/index.md
  • docs/connect/visualbasic/index.md
  • docs/connect/fsharp/index.md
📚 Learning: 2025-10-16T10:58:18.401Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 408
File: docs/connect/elixir.md:18-22
Timestamp: 2025-10-16T10:58:18.401Z
Learning: When connecting to CrateDB using PostgreSQL-compatible drivers like Postgrex (Elixir), the `database` parameter handling may differ from standard PostgreSQL usage because CrateDB has no notion of databases like PostgreSQL does. CrateDB uses schemas to separate concerns instead. The `database` parameter might need to be omitted or handled differently to avoid connection issues.

Applied to files:

  • docs/connect/csharp/index.md
  • docs/connect/visualbasic/index.md
  • docs/connect/fsharp/index.md
📚 Learning: 2025-08-14T19:02:43.308Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 253
File: docs/integrate/mindsdb/index.md:21-33
Timestamp: 2025-08-14T19:02:43.308Z
Learning: In CrateDB integration documentation examples, default connection parameters (user="crate", password="", host="127.0.0.1") are intentionally used to provide working out-of-the-box examples for users with local CrateDB instances, rather than using placeholder values that require customization.

Applied to files:

  • docs/connect/csharp/index.md
  • docs/connect/visualbasic/index.md
  • docs/connect/fsharp/index.md
📚 Learning: 2025-10-20T21:49:18.785Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 406
File: docs/connect/go.md:110-137
Timestamp: 2025-10-20T21:49:18.785Z
Learning: In the cratedb-guide repository, documentation examples for connecting to CrateDB (e.g., Go examples in docs/connect/go.md) should be kept minimal and focused on demonstrating basic functionality, rather than including comprehensive error handling. Full examples with proper error handling are maintained separately in the cratedb-examples repository.

Applied to files:

  • docs/connect/csharp/index.md
📚 Learning: 2025-06-05T14:29:15.512Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 207
File: docs/integrate/etl/iceberg-risingwave.md:205-207
Timestamp: 2025-06-05T14:29:15.512Z
Learning: The `records.Database("crate://", echo=True)` connection string for CrateDB works with defaults: localhost as host, "crate" as user, and blank password. This is valid and functional code in the records library.

Applied to files:

  • docs/connect/csharp/index.md
  • docs/connect/visualbasic/index.md
  • docs/connect/fsharp/index.md
📚 Learning: 2025-08-05T07:14:57.416Z
Learnt from: hammerhead
Repo: crate/cratedb-guide PR: 221
File: docs/connect/configure.md:58-66
Timestamp: 2025-08-05T07:14:57.416Z
Learning: In CrateDB connection strings, the user:password@ syntax is valid for HTTP Basic authentication on port 4200, but PostgreSQL JDBC drivers do not support this format and require credentials as query parameters (?user=<user>&password=<password>) instead.

Applied to files:

  • docs/connect/csharp/index.md
  • docs/connect/visualbasic/index.md
  • docs/connect/fsharp/index.md
📚 Learning: 2025-10-08T01:34:18.867Z
Learnt from: amotl
Repo: crate/cratedb-guide PR: 385
File: docs/connect/java.md:48-51
Timestamp: 2025-10-08T01:34:18.867Z
Learning: CrateDB JDBC driver uses the `jdbc:crate://` protocol scheme but communicates via the PostgreSQL wire protocol on port 5432, just like the PostgreSQL JDBC driver (`jdbc:postgresql://`). Do not confuse the `jdbc:crate://` scheme with other protocol schemes like `crate://` (used by SQLAlchemy dialect for CrateDB) or assume it uses the HTTP endpoint on port 4200.

Applied to files:

  • docs/connect/visualbasic/index.md
🪛 markdownlint-cli2 (0.18.1)
docs/connect/fsharp/index.md

92-92: Bare URL used

(MD034, no-bare-urls)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build docs
🔇 Additional comments (6)
docs/connect/fsharp/index.md (2)

47-47: Connection string correctly updated to remove implicit database reference.

The removal of /doc from the PostgreSQL connection URI aligns with the PR objective. CrateDB does not support multiple databases; the schema name doc should not appear in connection strings. Based on learnings, the database parameter is properly omitted here.


92-92: Address markdownlint bare URL warning in code example.

Static analysis flags a bare URL on this line (MD034). While this is inside a code block, verify whether this repo's documentation standards require wrapping the URL in angle brackets or another format. If this is a strict linting requirement, consider adjusting the code example formatting.

docs/connect/csharp/index.md (2)

49-49: Connection string correctly updated to remove incorrect Database parameter.

The removal of Database=doc; aligns with the PR objective and the fact that CrateDB does not support multiple databases. Based on learnings, Npgsql connections to CrateDB should omit the database parameter entirely.


77-77: Cloud connection string correctly updated.

The removal of Database=doc; from the CrateDB Cloud example is consistent with the local example and maintains the same pattern shown in the canonical example.

docs/connect/visualbasic/index.md (2)

49-49: Connection string correctly updated to remove incorrect Database parameter.

The removal of Database=doc; maintains consistency with the C# examples and aligns with the PR objective. CrateDB does not support multiple databases, so the Database parameter should be omitted.


85-85: Cloud connection string correctly updated.

The removal of Database=doc; from the CrateDB Cloud example is consistent with the local example and mirrors the pattern in the C# documentation.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@surister surister left a comment

Choose a reason for hiding this comment

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

Fair enough, nothing agains't this

@amotl amotl merged commit d525a28 into main Dec 26, 2025
3 checks passed
@amotl amotl deleted the connect-without-database branch December 26, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanding-1200 Fine sanding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants