From b1735044d222e7173447d6b72d6bc90085994d32 Mon Sep 17 00:00:00 2001 From: Stefan Kreutz Date: Wed, 15 Apr 2026 23:22:57 +0200 Subject: Turn required arguments into optional flags Thereby add minimal --help option. This is a breaking change of the command-line interface. --- temp-postgres.1 | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'temp-postgres.1') 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 +.\" Copyright (c) 2022, 2026 Stefan Kreutz .\" .\" 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: -- cgit v1.3