From 95edb227d3812249e90c104d02fcf2ee6a59e7fb Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Tue, 29 Nov 2022 11:23:07 -0500 Subject: nix: fix psql expressions --- flake.nix | 8 ++++---- 1 file 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 ''; -- cgit v1.3.1