feat: Make db-uri optional

The default is now "postgresql://" which falls back to LIBPQ environment variables.

Resolves #1991, Ref #1823
This commit is contained in:
Wolfgang Walther
2022-01-22 15:13:19 +01:00
parent ec09b87940
commit 9ed30c0ba4
21 changed files with 108 additions and 107 deletions
+3
View File
@@ -45,6 +45,9 @@ let
inRootDir = true;
}
''
# previously required settings to make this work with older branches
export PGRST_DB_URI="postgresql://"
export PGRST_DB_CONFIG="false"
export PGRST_DB_POOL="1"
export PGRST_DB_TX_END="rollback-allow-override"
+1 -2
View File
@@ -35,7 +35,7 @@ let
}
''
# avoid starting multiple layers of withTmpDb
if test -v PGRST_DB_URI; then
if test -v PGHOST; then
exec "$_arg_command" "''${_arg_leftovers[@]}"
fi
@@ -53,7 +53,6 @@ let
export PGHOST="$tmpdir/socket"
export PGUSER
export PGDATABASE
export PGRST_DB_URI="postgresql:///$PGDATABASE?host=$PGHOST&user=$PGUSER"
export PGRST_DB_SCHEMAS
export PGRST_DB_ANON_ROLE