bummer, I need to double quote all my existing db-ops scripts to account for the extra 'su -c ...' and just now I found that 'create database' does not support 'IF NOT EXIST' and that I have to go in a huge roundabout involving some creature called \gexec which after an hour I found out it is not supported in 'psql -c ...'. Hey I think I have found in PG a new sadomasochistic group. Whips! yummy not.
Edit: psql -Upostgres will run the commands via the 'postgres' linux user. I thought it runs the SQL commands via a db user. OK now I can avoid the constant su but I have to enter password all the time! So better running the script via su -c db-init-script.sh - postgres.
In reply to Re^5: Database access and async web framework (like Mojolicious)
by bliako
in thread Database access and async web framework (like Mojolicious)
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |