Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    a8487e15
    Fix problems with SQL functions returning rowtypes that have dropped · a8487e15
    Tom Lane authored
    columns.  The returned tuple needs to have appropriate NULL columns
    inserted so that it actually matches the declared rowtype.  It seemed
    convenient to use a JunkFilter for this, so I made some cleanups and
    simplifications in the JunkFilter code to allow it to support this
    additional functionality.  (That in turn exposed a latent bug in
    nodeAppend.c, which is that it was returning a tuple slot whose
    descriptor didn't match its data.)  Also, move check_sql_fn_retval
    out of pg_proc.c and into functions.c, where it seems to more naturally
    belong.
    a8487e15
    History
    Fix problems with SQL functions returning rowtypes that have dropped
    Tom Lane authored
    columns.  The returned tuple needs to have appropriate NULL columns
    inserted so that it actually matches the declared rowtype.  It seemed
    convenient to use a JunkFilter for this, so I made some cleanups and
    simplifications in the JunkFilter code to allow it to support this
    additional functionality.  (That in turn exposed a latent bug in
    nodeAppend.c, which is that it was returning a tuple slot whose
    descriptor didn't match its data.)  Also, move check_sql_fn_retval
    out of pg_proc.c and into functions.c, where it seems to more naturally
    belong.