aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2022-11-29 11:23:07 -0500
committerNathan Perry <np@nathanperry.dev>2022-11-29 11:23:07 -0500
commit95edb227d3812249e90c104d02fcf2ee6a59e7fb (patch)
tree9a97e6309b5cb836ec8bbd31e0b002ffe89f4ec0
parent6181fc78cd125c48584e933a60188ec51819130d (diff)
nix: fix psql expressions
-rw-r--r--flake.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 32b6024..8788687 100644
--- a/flake.nix
+++ b/flake.nix
@@ -275,11 +275,11 @@
echo 'CREATE EXTENSION IF NOT EXISTS pgcrypto' | ${invokePsql} ${cfg.postgres.db}
- for tbl in $(psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" ${cfg.postgres.db}) \
- $(psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" ${cfg.postgres.db}) \
- $(psql -qAt -c "select table_name from information_schema.views where table_schema = 'public';" ${cfg.postgres.db}) ;
+ for tbl in $(${invokePsql} -qAt -c "select tablename from pg_tables where schemaname = 'public';" ${cfg.postgres.db}) \
+ $(${invokePsql} -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" ${cfg.postgres.db}) \
+ $(${invokePsql} -qAt -c "select table_name from information_schema.views where table_schema = 'public';" ${cfg.postgres.db}) ;
do
- psql -c "alter table \"$tbl\" owner to ${cfg.user}" ${cfg.postgres.db};
+ ${invokePsql} -c "alter table \"$tbl\" owner to ${cfg.user}" ${cfg.postgres.db};
done
'';