DASSL / ClassDB

An open-source system to let students experiment with relational data
https://dassl.github.io/ClassDB/
Other
7 stars 2 forks source link

Logging script reorg #100

Closed wildtayne closed 7 years ago

wildtayne commented 7 years ago

prepareUserLogging was removed and reorganized per #35. The resulting scripts are:

(Fixes #35).

smurthys commented 7 years ago

Consider the following in addDDLMonitors.sql:


--This script should be run in every database in which DDL activity monitoring is required
-- it should be run after running addUserMgmt.sql

For M1, we don't need to worry about dropping old functions when we rename them. We do need to write healing scripts for next releases. (I make the renaming proposals knowing that the Student table will highly likely become User table.)

Consider the following in addLogMgmt.sql:


--This script should be run in every database in which log management is required
-- it should be run after running enableServerLogging.sql for the server and after running
-- addUserMgmt.sql for the current database

Consider the following in enableServerLogging.sql:

wildtayne commented 7 years ago

Thanks for the feedback - I've pushed some commits implementing the changes. I had placed pg_reload_conf() in the transaction block so the superuser check would throw a nicer looking error if the user didn't have permission to execute it. However, it's not really necessary, and requires the dependency on the helper functions or duplicate code.

afig commented 7 years ago

Looks good!