We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e64dc8a commit a86aef6Copy full SHA for a86aef6
README.md
@@ -22,11 +22,16 @@ The wheel can be installed with pip:
22
$ pip install postgresql-wheel
23
```
24
25
+Postgres binaries in the package can be found in the directory pointed
26
+to by the `postgresql.pg_bin` global variable. `initdb` and `pg_ctl`
27
+functions are provided for convenience:
28
+
29
```py3
30
>>> from postgresql import initdb, pg_ctl
31
>>> initdb('-D testdatabase')
32
>>> pg_ctl('-D testdatabase -o "-p 5678" -l testdatabase.log start')
33
34
+>>> import psycopg2
35
>>> c = psycopg2.connect("postgres://localhost:5678/postgres") # connect with local client
36
>>> with c.cursor() as q:
37
>>> q.execute("select version()")
0 commit comments