Package org.postgresql.pljava.example
Class Triggers
- java.lang.Object
-
- 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 classorg.postgresql.pljava.test.Tester
(no longer part of the build, see undersrc/java/test
).- Author:
- Thomas Hallgren
-
-
Constructor Summary
Constructors Constructor Description Triggers()
-
Method Summary
Modifier and Type Method Description static void
afterUsernameInsert(org.postgresql.pljava.TriggerData td)
static void
afterUsernameUpdate(org.postgresql.pljava.TriggerData td)
static void
insertUsername(org.postgresql.pljava.TriggerData td)
insert user name in response to a trigger.static void
leakStatements(org.postgresql.pljava.TriggerData td)
static void
moddatetime(org.postgresql.pljava.TriggerData td)
Update a modification time when the row is updated.
-
-
-
Constructor Detail
-
Triggers
public Triggers()
-
-
Method Detail
-
afterUsernameInsert
public static void afterUsernameInsert(org.postgresql.pljava.TriggerData td) throws SQLException
- Throws:
SQLException
-
afterUsernameUpdate
public static void afterUsernameUpdate(org.postgresql.pljava.TriggerData td) throws SQLException
- Throws:
SQLException
-
insertUsername
public static void insertUsername(org.postgresql.pljava.TriggerData td) throws SQLException
insert user name in response to a trigger.- Throws:
SQLException
-
leakStatements
public static void leakStatements(org.postgresql.pljava.TriggerData td) throws SQLException
- Throws:
SQLException
-
moddatetime
public static void moddatetime(org.postgresql.pljava.TriggerData td) throws SQLException
Update a modification time when the row is updated.- Throws:
SQLException
-
-