Skip to content

Commit 0044c10

Browse files
authored
Remove section about client application from front page of the docs (#808)
I removed the sections about client applications as it is already covered in the Tutorial and in a separate Guide.
1 parent dc239eb commit 0044c10

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

docs/getting-started.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,6 @@
22

33
This guide covers the key concepts of `pgroll` and how to get started with it.
44

5-
### Client applications
6-
7-
In order to work with the multiple versioned schema that `pgroll` creates, clients need to be configured to work with one of them.
8-
9-
This is done by having client applications configure the [search path](https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH) when they connect to the Postgres database.
10-
11-
For example, this fragment for a Go client application shows how to set the `search_path` after a connection is established:
12-
13-
```go
14-
db, err := sql.Open("postgres", "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable")
15-
if err != nil {
16-
return nil, err
17-
}
18-
19-
searchPath := "public_02_add_assignee_column"
20-
log.Printf("Setting search path to %q", searchPath)
21-
_, err = db.Exec(fmt.Sprintf("SET search_path = %s", pq.QuoteIdentifier(searchPath)))
22-
if err != nil {
23-
return nil, fmt.Errorf("failed to set search path: %s", err)
24-
}
25-
```
26-
27-
In practice, the `searchPath` variable would be provided to the application as an environment variable.
28-
29-
#### What happens if an application doesn't set the `search_path`?
30-
31-
If an application doesn't set the `search_path` for the connection, the `search_path` defaults to the `public` schema, meaning that the application will be working with the underlying tables directly rather than accessing them through the versioned views.
32-
335
## Supported Postgres versions
346

357
`pgroll` supports Postgres versions >= 14.

0 commit comments

Comments
 (0)