Skip to content

Commit 35eb997

Browse files
committed
Maintenance: Remove doc as database name across the board
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.
1 parent 0f7bb5c commit 35eb997

File tree

23 files changed

+35
-35
lines changed

23 files changed

+35
-35
lines changed

docs/connect/general.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ applications and drivers may obtain connection properties in different formats.
5959

6060
**Native PostgreSQL, psql**
6161
```text
62-
postgresql://<user>:<password>@<cluster>.cratedb.net:5432/doc
62+
postgresql://<user>:<password>@<cluster>.cratedb.net:5432/
6363
```
6464

6565
**JDBC: PostgreSQL pgJDBC**
6666
```text
67-
jdbc:postgresql://<cluster>.cratedb.net:5432/doc?user=<user>&password=<password>
67+
jdbc:postgresql://<cluster>.cratedb.net:5432/?user=<user>&password=<password>
6868
```
6969

7070
**JDBC: CrateDB JDBC, e.g. Apache Flink**
7171
```text
72-
jdbc:crate://<cluster>.cratedb.net:5432/doc?user=<user>&password=<password>
72+
jdbc:crate://<cluster>.cratedb.net:5432/?user=<user>&password=<password>
7373
```
7474

7575
**HTTP: Admin UI, CLI, CrateDB drivers**
@@ -119,17 +119,17 @@ crate://<user>:<password>@<cluster>.cratedb.net:4200/?schema=doc&ssl=true
119119

120120
**Native PostgreSQL, psql**
121121
```
122-
postgresql://crate@localhost:5432/doc
122+
postgresql://crate@localhost:5432/
123123
```
124124

125125
**JDBC: PostgreSQL pgJDBC**
126126
```text
127-
jdbc:postgresql://localhost:5432/doc?user=crate
127+
jdbc:postgresql://localhost:5432/?user=crate
128128
```
129129

130130
**JDBC: CrateDB JDBC, e.g. Apache Flink**
131131
```text
132-
jdbc:crate://localhost:5432/doc?user=<user>&password=<password>
132+
jdbc:crate://localhost:5432/?user=<user>&password=<password>
133133
```
134134

135135
**HTTP: Admin UI, CLI, CrateDB drivers**

docs/connect/go/ksql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func main() {
4949
ctx := context.Background()
5050

5151
// Connect to database.
52-
dbURL := "postgresql://crate:crate@localhost:5432/doc?sslmode=disable"
52+
dbURL := "postgresql://crate:crate@localhost:5432/?sslmode=disable"
5353
db, err := kpgx.New(ctx, dbURL, ksql.Config{})
5454
if err != nil {
5555
log.Fatalf("unable connect to database: %s", err)
@@ -81,7 +81,7 @@ For connecting to CrateDB Cloud, use `sslmode=require`, and
8181
replace username, password, and hostname with values matching
8282
your environment.
8383
```go
84-
dbURL := "postgresql://admin:[email protected]:5432/doc?sslmode=require"
84+
dbURL := "postgresql://admin:[email protected]:5432/?sslmode=require"
8585
```
8686

8787
:::{rubric} Quickstart example

docs/connect/go/pgx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func main() {
4444
ctx := context.Background()
4545

4646
// Connect to database.
47-
conn, _ := pgx.Connect(ctx, "postgresql://crate:crate@localhost:5432/doc?sslmode=disable")
47+
conn, _ := pgx.Connect(ctx, "postgresql://crate:crate@localhost:5432/?sslmode=disable")
4848
defer conn.Close(ctx)
4949

5050
// Invoke basic query.
@@ -68,7 +68,7 @@ For connecting to CrateDB Cloud, use `sslmode=require`, and
6868
replace username, password, and hostname with values matching
6969
your environment.
7070
```go
71-
conn, _ := pgx.Connect(ctx, "postgresql://admin:[email protected]:5432/doc?sslmode=require")
71+
conn, _ := pgx.Connect(ctx, "postgresql://admin:[email protected]:5432/?sslmode=require")
7272
```
7373

7474
:::{rubric} Quickstart example

docs/connect/go/pq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
func main() {
2424

2525
// Connect to database.
26-
connStr := "postgresql://crate:crate@localhost:5432/doc?sslmode=disable"
26+
connStr := "postgresql://crate:crate@localhost:5432/?sslmode=disable"
2727
db, _ := sql.Open("postgres", connStr)
2828
defer db.Close()
2929

@@ -48,7 +48,7 @@ For connecting to CrateDB Cloud, use `sslmode=require`, and
4848
replace username, password, and hostname with values matching
4949
your environment.
5050
```go
51-
connStr := "postgresql://admin:[email protected]:5432/doc?sslmode=require"
51+
connStr := "postgresql://admin:[email protected]:5432/?sslmode=require"
5252
```
5353

5454
:::{rubric} Quickstart example

docs/connect/java/cratedb-jdbc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void main() throws SQLException {
4242
properties.put("user", "crate");
4343
properties.put("password", "crate");
4444
Connection conn = DriverManager.getConnection(
45-
"jdbc:crate://localhost:5432/doc?sslmode=disable",
45+
"jdbc:crate://localhost:5432/?sslmode=disable",
4646
properties
4747
);
4848
conn.setAutoCommit(true);
@@ -71,7 +71,7 @@ your environment.
7171
properties.put("user", "admin");
7272
properties.put("password", "password");
7373
Connection conn = DriverManager.getConnection(
74-
"jdbc:crate://testcluster.cratedb.net:5432/doc?sslmode=require",
74+
"jdbc:crate://testcluster.cratedb.net:5432/?sslmode=require",
7575
properties
7676
);
7777
```

docs/connect/java/postgresql-jdbc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void main() throws SQLException {
4242
properties.put("user", "crate");
4343
properties.put("password", "crate");
4444
Connection conn = DriverManager.getConnection(
45-
"jdbc:postgresql://localhost:5432/doc?sslmode=disable",
45+
"jdbc:postgresql://localhost:5432/?sslmode=disable",
4646
properties
4747
);
4848
conn.setAutoCommit(true);
@@ -71,7 +71,7 @@ your environment.
7171
properties.put("user", "admin");
7272
properties.put("password", "password");
7373
Connection conn = DriverManager.getConnection(
74-
"jdbc:postgresql://testcluster.cratedb.net:5432/doc?sslmode=require",
74+
"jdbc:postgresql://testcluster.cratedb.net:5432/?sslmode=require",
7575
properties
7676
);
7777
```

docs/connect/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ more modern PostgreSQL and Python features, such as:
129129
```python
130130
import psycopg
131131

132-
with psycopg.connect("postgres://crate@localhost:5432/doc") as conn:
132+
with psycopg.connect("postgres://crate:crate@localhost:5432/") as conn:
133133
with conn.cursor() as cursor:
134134
cursor.execute("SELECT * FROM sys.summits")
135135
for record in cursor:

docs/connect/scala/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ object Example {
4444

4545
// Configure connection.
4646
val driver = "org.postgresql.Driver"
47-
val url = "jdbc:postgresql://localhost:5432/doc?sslmode=disable"
47+
val url = "jdbc:postgresql://localhost:5432/?sslmode=disable"
4848
val username = "crate"
4949
val password = "crate"
5050

@@ -81,7 +81,7 @@ your environment.
8181

8282
Also use this variant to connect to CrateDB Cloud.
8383
```scala
84-
val url = "jdbc:postgresql://testcluster.cratedb.net:5432/doc?sslmode=require"
84+
val url = "jdbc:postgresql://testcluster.cratedb.net:5432/?sslmode=require"
8585
val username = "admin"
8686
val password = "password"
8787
```

docs/integrate/airflow/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ file. To learn about alternative ways, please check the
139139
[Astronomer Environment variables documentation].
140140
The first variable to define is one for the CrateDB connection, as follows:
141141

142-
`AIRFLOW_CONN_CRATEDB_CONNECTION=postgresql://<user>:<password>@<host>/doc?sslmode=disable`
142+
`AIRFLOW_CONN_CRATEDB_CONNECTION=postgresql://<user>:<password>@<host>/?sslmode=disable`
143143

144144
For TLS, set `sslmode=require`. To confirm that the variable is applied, start
145145
the project and open a bash session in the scheduler container:

docs/integrate/airflow/import-stock-market-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ There are now three things you have to adjust before running Airflow:
7878
* Add your CrateDB credentials to the `.env` file. Open the file in a text editor, and add the following line, which takes the default credentials for CrateDB, with user = crate, and password = null. (note: my internal port for running CrateDB in Docker is 5433, which I use here. If using the standard Docker command with 5432, here it should also be 5432).
7979
```bash
8080
# For local development only; do not commit real credentials
81-
AIRFLOW_CONN_CRATEDB_CONNECTION=postgresql://crate:null@host.docker.internal:5433/doc?sslmode=disable
81+
AIRFLOW_CONN_CRATEDB_CONNECTION=postgresql://crate:crate@host.docker.internal:5433/?sslmode=disable
8282
```
8383
* If the default ports are unavailable, you can change them to free ports. Just open the `.astro/config.yaml` file in a text editor and update the web server port to 8081 (instead of default 8080) and Postgres port to 5435 (instead of the default 5432), like so:
8484
```yaml

0 commit comments

Comments
 (0)