6367e359ea
When the psql command runs from a directory it does not have permission to access, it outputs an error. This error trips up the unless SQL command, causing the other SQL commands to run even if not needed. Rather than ignore stderr (which might hide something else), or use an arbitrary directory like /tmp, this code sets the cwd to the data directory, which will exist and be owned by the postgres user. If someone uses the postgres_psql type and customises the psql_user parameter, they should also set an appropriate cwd. |
||
---|---|---|
.. | ||
config | ||
package_source | ||
config.pp | ||
database.pp | ||
database_grant.pp | ||
database_user.pp | ||
db.pp | ||
devel.pp | ||
init.pp | ||
initdb.pp | ||
params.pp | ||
psql.pp | ||
role.pp | ||
server.pp | ||
validate_db_connection.pp |