diff options
| author | Tom Lane | 2004-10-07 18:38:51 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-10-07 18:38:51 +0000 |
| commit | a8487e15ed91c10bdbba1096c6e941c6ecb8b11a (patch) | |
| tree | 03bad7b5e08fc0e7762b273685acc3902139dc9b /src/include/executor/executor.h | |
| parent | 6d46ea25f2131b34c1983a171e45041ba93390e0 (diff) | |
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.
Diffstat (limited to 'src/include/executor/executor.h')
| -rw-r--r-- | src/include/executor/executor.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 7f894f26d8b..21d8335cfb1 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.113 2004/09/13 20:07:52 tgl Exp $ + * $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.114 2004/10/07 18:38:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -85,8 +85,11 @@ extern TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable, /* * prototypes from functions in execJunk.c */ -extern JunkFilter *ExecInitJunkFilter(List *targetList, TupleDesc tupType, +extern JunkFilter *ExecInitJunkFilter(List *targetList, bool hasoid, TupleTableSlot *slot); +extern JunkFilter *ExecInitJunkFilterConversion(List *targetList, + TupleDesc cleanTupType, + TupleTableSlot *slot); extern bool ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot, char *attrName, Datum *value, bool *isNull); extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot); |
