diff options
| author | Nathan Perry <np@nathanperry.dev> | 2022-11-29 11:23:07 -0500 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2022-11-29 11:23:07 -0500 |
| commit | 95edb227d3812249e90c104d02fcf2ee6a59e7fb (patch) | |
| tree | 9a97e6309b5cb836ec8bbd31e0b002ffe89f4ec0 /flake.nix | |
| parent | 6181fc78cd125c48584e933a60188ec51819130d (diff) | |
nix: fix psql expressions
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 ''; |
