Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/connect/elixir/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ result = Postgrex.query!(conn, "SELECT region, mountain, height FROM sys.summits
IO.inspect(result)
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, adjust the `ssl: true` parameter,
Adjust the `ssl: true` parameter,
and replace hostname, username, and password with values matching your
environment.

Also use this variant to connect to CrateDB Cloud.
```elixir
options = [
hostname: "testcluster.cratedb.net",
Expand Down
8 changes: 5 additions & 3 deletions docs/connect/go/ksql.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,19 @@ func main() {
}
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use `sslmode=require`, and
Use `sslmode=require`, and
replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```go
dbURL := "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require"
```

:::{rubric} Quickstart example
:::{rubric} Example
:::

Create the file `example.go` including the synopsis code shared above.
Expand Down
6 changes: 4 additions & 2 deletions docs/connect/go/pgx.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ func main() {
}
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use `sslmode=require`, and
Use `sslmode=require`, and
replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```go
conn, _ := pgx.Connect(ctx, "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require")
```
Expand Down
8 changes: 5 additions & 3 deletions docs/connect/go/pq.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ func main() {
}
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use `sslmode=require`, and
Use `sslmode=require`, and
replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```go
connStr := "postgresql://admin:password@testcluster.cratedb.net:5432/doc?sslmode=require"
```

:::{rubric} Quickstart example
:::{rubric} Example
:::

Create the file `example.go` including the synopsis code shared above.
Expand Down
6 changes: 4 additions & 2 deletions docs/connect/java/cratedb-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ void main() throws SQLException {
}
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use the `sslmode=require` parameter,
Use the `sslmode=require` parameter,
and replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```java
properties.put("user", "admin");
properties.put("password", "password");
Expand Down
6 changes: 4 additions & 2 deletions docs/connect/java/postgresql-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ void main() throws SQLException {
}
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use the `sslmode=require` parameter,
Use the `sslmode=require` parameter,
and replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```java
properties.put("user", "admin");
properties.put("password", "password");
Expand Down
22 changes: 12 additions & 10 deletions docs/connect/odbc/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ using (OdbcConnection connection = new OdbcConnection(connection_string))
}
```

:::{rubric} SSL connection
:::

Use the `Sslmode=require` parameter,
and replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```csharp
string connection_string = "Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;Uid=admin;Pwd=password";
```

:::{rubric} Example
:::

Expand All @@ -68,16 +80,6 @@ Invoke program.
dotnet run
```

:::{rubric} CrateDB Cloud
:::

For connecting to CrateDB Cloud, use the `Sslmode=require` parameter,
and replace username, password, and hostname with values matching
your environment.
```csharp
string connection_string = "Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;Uid=admin;Pwd=password";
```


[.NET Framework Data Provider for ODBC]: https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/data-providers#net-framework-data-provider-for-odbc
[System.Data.Odbc]: https://learn.microsoft.com/en-us/dotnet/api/system.data.odbc
8 changes: 5 additions & 3 deletions docs/connect/odbc/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,16 @@ Invoke program.
python example.py
```

## CrateDB Cloud
## SSL connection

For connecting to CrateDB Cloud, use the `Sslmode=require` parameter,
Use the `Sslmode=require` parameter,
and replace username, password, and hostname with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```python
connection_string = \
"Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;" \
"Driver={PostgreSQL Unicode};Server=testcluster.cratedb.net;Port=5432;Sslmode=require;" \
"Uid=admin;Pwd=password;MaxVarcharSize=1073741824"
```

Expand Down
6 changes: 4 additions & 2 deletions docs/connect/r/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ res <- dbGetQuery(conn, "SELECT * FROM sys.summits ORDER BY height DESC LIMIT 10
print(res)
```

:::{rubric} CrateDB Cloud
:::{rubric} SSL connection
:::

For connecting to CrateDB Cloud, use `sslmode = "require"`, and
Use `sslmode = "require"`, and
replace hostname, username, and password with values matching
your environment.

Also use this variant to connect to CrateDB Cloud.
```r
conn <- dbConnect(RPostgres::Postgres(),
host = "testcluster.cratedb.net",
Expand Down
6 changes: 4 additions & 2 deletions docs/connect/rust/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ cargo add postgres
cargo run
```

:::{rubric} Synopsis (CrateDB Cloud)
:::{rubric} Synopsis (SSL connection)
:::
For CrateDB Cloud, add TLS support and update the connection string with
Add TLS support and update the connection string with
your cluster details.

Also use this variant to connect to CrateDB Cloud.

`src/main.rs`
```rust
use postgres::Client;
Expand Down