summaryrefslogtreecommitdiff
path: root/temp-postgres.1
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2026-04-15 23:22:57 +0200
committerStefan Kreutz <mail@skreutz.com>2026-04-16 00:41:56 +0200
commitb1735044d222e7173447d6b72d6bc90085994d32 (patch)
tree52b8494020af10496f776b028b1894ad0fd9bfbd /temp-postgres.1
parent2a7d8d3aa4b8b7e345cda70ea0a110bef775d132 (diff)
downloadtemp-postgres-b1735044d222e7173447d6b72d6bc90085994d32.tar.gz
Turn required arguments into optional flags
Thereby add minimal --help option. This is a breaking change of the command-line interface.
Diffstat (limited to 'temp-postgres.1')
-rw-r--r--temp-postgres.129
1 files changed, 15 insertions, 14 deletions
diff --git a/temp-postgres.1 b/temp-postgres.1
index caf4b78..1adb8ed 100644
--- a/temp-postgres.1
+++ b/temp-postgres.1
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2022 Stefan Kreutz <mail@skreutz.com>
+.\" Copyright (c) 2022, 2026 Stefan Kreutz <mail@skreutz.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -11,7 +11,7 @@
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd $Mdocdate: May 19 2022 $
+.Dd $Mdocdate: April 15 2026 $
.Dt TEMP-POSTGRES 1
.Os
.Sh NAME
@@ -19,28 +19,29 @@
.Nd temporary PostgreSQL server
.Sh SYNOPSIS
.Nm temp-postgres
-.Ar database
-.Ar superuser
+.Op options
.Sh DESCRIPTION
The
.Nm
utility runs the PostgreSQL server off a temporary data directory.
.Pp
-It expects exactly two arguments:
-a
-.Ar database
-name
-and a
-.Ar superuser
-name.
-You may also set the port using PGPORT, see
-.Xr postgres 1 .
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl h , -help
+Print help.
+.It Fl d , -dbname Ar dbname
+The PostgreSQL database name.
+Defaults to the name of the effective user.
+.It Fl u , -username Ar username
+The PostgreSQL user name.
+Defaults to the name of the effective user.
+.El
.Sh EXIT STATUS
.Ex -std temp-postgres
.Sh EXAMPLES
Create a temporary database "test" with superuser "alex":
.Bd -literal -offset indent
-$ temp-postgres test alex
+$ temp-postgres --dbname test --username alex
.Ed
.Pp
Connect to the "test" database:
Generated by cgit. See skreutz.com for my tech blog and contact information.