blob: 37ef2f68d89fe144e0f82c00ed74c967fb74365d (
plain)
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
|
# Temp PostgreSQL
The `temp-postgres` utility runs the PostgreSQL server off a temporary data
directory. See [this][intro] blog post for an introduction.
This project's original source code is hosted [here][home].
[intro]: https://www.skreutz.com/posts/temporary-postgresql-server/
[home]: https://git.skreutz.com/temp-postgres.git/
## Usage
Create a temporary database "test" with superuser "alex":
$ temp-postgres test alex
Connect to the "test" database:
$ psql --host=localhost test alex
See the manual page for details.
## Dependencies
The `temp-postgres` utility depends on `sh(1)` and `postgres(1)`.
On OpenBSD you can install the dependencies using `pkg_add(1)`:
$ doas pkg_add postgresql-server postgresql-client
On Void Linux you can install the dependencies using `xbps-install(1)`:
$ sudo xbps-install -S dash postgresql postgresql-client
## Installation
$ ./configure
$ make
$ sudo make install
There's also an experimental Nix flake:
$ nix run git+https://git.skreutz.com/temp-postgres.git/?ref=nix
|
for my tech blog and contact information.