pg-triggers

0.3.2 • Public • Published

pg-triggers

Triggers for postgres

extending npm-version downloads build coverage dependencies

language: English also available in: Spanish

Install

$ psql < lib/recreate-his.sql
$ psql < lib/table-changes.sql
$ psql < lib/function-changes-trg.sql

Config

$ psql < lib/enance.sql
$ psql -c "select enance_table('state','country,state')"

You must call enance_table(table_name, primary_key_fields) for each table that you want to audit changes on each time you create a table or alter the primary key. By default the function will audit inserts, updates and deletes. But exists a third parameter method (optional). If this param receives the 'ud' value won't audit inserts (only will listen for updates and deletes)

Devel

$ npm install pg-triggers
$ npm test

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i pg-triggers

Weekly Downloads

4

Version

0.3.2

License

MIT

Unpacked Size

7.76 kB

Total Files

8

Last publish

Collaborators

  • tute