• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Postgres Trigger

 
Anand Karia
Ranch Hand
Posts: 156
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am new to postgres sql. I have a table namely "Status" having 3 columns
TranDate,VoucherNo,UserID.....

I want to fire a trigger that if any changes made into above table then a new entry must be added into another Audit table namely "Audit_Status" having same columns with additional column that shows which operation is fired. like if
Addition is made then action will show A.
Edition is made then action will show E.
Deletion is made then action will show D.

Can anybody help me out who is using postgres database, how to make triggers and functions using above columns and tables
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic