• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Postgres Trigger

 
Ranch Hand
Posts: 158
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic