{"repo":"PGSuite/PGHist","free":true,"listed":false,"github":"https://github.com/PGSuite/PGHist","clone":"git clone https://github.com/PGSuite/PGHist.git","description":"History and audit of table changes in PostgreSQL","language":"PLpgSQL","stars":38,"topics":["audit","changes","postgresql","history","log","logging","table"],"license":"MIT","category":"databases-storage","readme_excerpt":"PGHist History and audit of table changes in PostgreSQL Tool PGHist keeps history of table changes and allows to get log(audit) of changes by row, list of changes by field indicating user, time of the change, SQL query, transaction, other technical information and table as of date-time in the past (versioning). To display information in user interface, SQL expressions are defined to describe changed table rows and fields. It is possible to override the operation name and username functions. Design and working principle ### PGHIST is a schema with procedures and common tables: transactions, SQL expressions etc. When history is enabled (procedure pghist.hist enable ), for specified table created additional table, triggers for insert,update,delete,truncate, stored procedures and view for obtaining data. When a table is changed, triggers are fired that modify the history table. There are also event triggers that rebuild the history table and recreate the stored procedures. Installation ### The installer is pghist init.sql file that creates pghist schema. The installation consists in executing it in the psql terminal client or SQL manager, for example: Optional. If the developers are not superusers, need to grant them privileges on the pghist schema and its procedures. To do this, use the SQL script pghist grants.sql with the roles variable. For example: Extension ### To install PGHist as an extension, unpack the pghist extension.tar archive into the [sharedir]/extension directory","default_branch":null,"files":null,"tree":[],"storefront":"/r/PGSuite","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PGSuite/PGHist/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}