File: README.md

package info (click to toggle)
harlequin-postgres 1.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 324 kB
  • sloc: python: 1,651; makefile: 24
file content (64 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# harlequin-postgres

This project provides the Harlequin adapter for Postgres. For more information, see [harlequin.sh](https://harlequin.sh/docs/postgres/index).


## Installation

You must install the `harlequin-postgres` package into the same environment as `harlequin`. The best and easiest way to do this is to use `uv` to install Harlequin with the `postgres` extra:

```bash
uv tool install 'harlequin[postgres]'
```

## Using Harlequin with Postgres

To connect to a Postgres database, run Harlequin with the `-a postgres` option and pass a [Posgres DSN](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) as an argument:

```bash
harlequin -a postgres "postgres://my-user:my-pass@localhost:5432/my-database"
```

## Connection Options

You can also pass all or parts of the connection string as separate options. The following is equivalent to the above DSN:

```bash
harlequin -a postgres -h localhost -p 5432 -U my-user --password my-pass -d my-database
```

The supported connection options are:

```
host
port
dbname
user
password
passfile
require_auth
channel_binding
connect_timeout
sslmode
sslcert
sslkey
```

For descriptions of each option, run:

```
harlequin --help
```

## Environment Variables

Harlequin's Postgres driver will load connection information from the standard `PG*` environment variables. Any options supplied at the command-line will override environment variables.


## Manual Transactions

To use Manual transaction mode, click on the label in the Run Query Bar to toggle the transaction mode from Auto to Manual.

## Further Documentation

For more information, see the [Harlequin Docs](https://harlequin.sh/docs/postgres/index).