Postgresql

All tags

Elixir, postgres and chocolatey

You try to use the phoenix getting started guide on windows and the task “mix ecto.create” fails with an useless error? Chances are your postgresql database isn’t available with the ecto default credentials “postgres”:“postgres”. Try to logon to the database with the credentials “postgres”:“Postgres1234” and change the password for the user to “postgres”.¬†Also, don’t forget to change the password of the Windows user “postgres”. Update 15.11.2015: You also have to change the logon information for the service, otherwise postgresql won’t start after an restart.

postgreSQL - Dynamic SQL in trigger-functions for table audit

The problem For a college project I tried to create a pl/pgsql trigger function, which should be invoked by a trigger and then saves the unaltered dataset to an audit table. This task alone is no rocket science and therefore boring. I would have to create a trigger, a trigger function and a log table per auditing table and call the function on ervery update or delete. Instead I aimed for this solution: