org.postgresql.pljava.example
Class Triggers

java.lang.Object
  extended by org.postgresql.pljava.example.Triggers

public class Triggers
extends Object

This class contains some triggers that I found written in C under the contrib/spi directory of the postgres source distribution. Code to create the necessary tables, functions, triggers, and some code to actually execute them can be found in class Tester.

Author:
Thomas Hallgren

Constructor Summary
Triggers()
           
 
Method Summary
static void afterUsernameInsert(TriggerData td)
           
static void afterUsernameUpdate(TriggerData td)
           
static void insertUsername(TriggerData td)
          insert user name in response to a trigger.
static void leakStatements(TriggerData td)
           
static void moddatetime(TriggerData td)
          Update a modification time when the row is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triggers

public Triggers()
Method Detail

insertUsername

public static void insertUsername(TriggerData td)
                           throws SQLException
insert user name in response to a trigger.

Throws:
SQLException

leakStatements

public static void leakStatements(TriggerData td)
                           throws SQLException
Throws:
SQLException

afterUsernameInsert

public static void afterUsernameInsert(TriggerData td)
                                throws SQLException
Throws:
SQLException

afterUsernameUpdate

public static void afterUsernameUpdate(TriggerData td)
                                throws SQLException
Throws:
SQLException

moddatetime

public static void moddatetime(TriggerData td)
                        throws SQLException
Update a modification time when the row is updated.

Throws:
SQLException