OSDN Git Service

Fix problems with SQL functions returning rowtypes that have dropped
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Oct 2004 18:38:51 +0000 (18:38 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Oct 2004 18:38:51 +0000 (18:38 +0000)
commita8487e15ed91c10bdbba1096c6e941c6ecb8b11a
tree03bad7b5e08fc0e7762b273685acc3902139dc9b
parent6d46ea25f2131b34c1983a171e45041ba93390e0
Fix problems with SQL functions returning rowtypes that have dropped
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.
src/backend/catalog/pg_proc.c
src/backend/executor/execJunk.c
src/backend/executor/execMain.c
src/backend/executor/functions.c
src/backend/executor/nodeAppend.c
src/backend/optimizer/util/clauses.c
src/include/catalog/pg_proc.h
src/include/executor/executor.h
src/include/executor/functions.h
src/include/nodes/execnodes.h