Class Relation

  • public class Relation
    extends Object
    The Relation correspons to the internal PostgreSQL Relation.
    Thomas Hallgren
    • Method Detail

      • modifyTuple

        public Tuple modifyTuple​(Tuple original,
                                 int[] fieldNumbers,
                                 Object[] values)
                          throws SQLException
        Creates a new Tuple by substituting new values for selected columns copying the columns of the original Tuple at other positions. The original Tuple is not modified.

        Note: starting with PostgreSQL 10, this method can fail if SPI is not connected; it is the caller's responsibility in PG 10 and up to ensure that SPI is connected and that a longer-lived memory context than SPI's has been selected, if the caller wants the result of this call to survive SPI_finish.

        original - The tuple that serves as the source.
        fieldNumbers - An array of one based indexes denoting the positions that are to receive modified values.
        values - The array of new values. Each value in this array corresponds to an index in the fieldNumbers array.
        A copy of the original with modifications.
        SQLException - if indexes are out of range or the values illegal.