File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Postgres Trigger Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Postgres Trigger" Watch "Postgres Trigger" New topic

Postgres Trigger

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hi All

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

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

Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
It is sorta covered in the JavaRanch Style Guide.
subject: Postgres Trigger
Similar Threads
Runtime Creating Tables
Tutorial PostgreSQL 8.3 on Glassfish V2.1 for ConnectionPool in Netbeans 6.5.1, WindowsXP (Post 3)
jTable Header Problem
How to get the number of columns in a table
Invoking java layer from JSP