All Implemented Interfaces:
Lifespan

public class Invocation extends LifespanImpl
One invocation, from PostgreSQL, of functionality implemented using PL/Java.

This class is the Java counterpart of the struct Invocation_ in the C code, but while there is a new stack-allocated C structure on every entry from PG to PL/Java, no instance of this class is created unless requested (with current(); once requested, a reference to it is saved in the C struct for the duration of the invocation.

Author:
Thomas Hallgren
  • Method Details

    • getNestingLevel

      public int getNestingLevel()
      Returns:
      The nesting level of this invocation
    • getSavepoint

      public final PgSavepoint getSavepoint()
      Returns:
      Returns the savePoint.
    • setSavepoint

      public final void setSavepoint(PgSavepoint savepoint)
      Parameters:
      savepoint - The savepoint to set.
    • current

      public static Invocation current()
      Returns:
      The current invocation
    • upperExecutorContext

      public static MemoryContext upperExecutorContext()
      The "upper executor" memory context (that is, the context on entry, prior to any SPI_connect) associated with the current (innermost) invocation.
    • clearErrorCondition

      public static void clearErrorCondition()