mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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.
This commit is contained in:
@ -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/functions.h,v 1.22 2004/08/29 04:13:06 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/executor/functions.h,v 1.23 2004/10/07 18:38:51 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -15,7 +15,13 @@
|
||||
#define FUNCTIONS_H
|
||||
|
||||
#include "fmgr.h"
|
||||
#include "nodes/execnodes.h"
|
||||
|
||||
|
||||
extern Datum fmgr_sql(PG_FUNCTION_ARGS);
|
||||
|
||||
extern bool check_sql_fn_retval(Oid rettype, char fn_typtype,
|
||||
List *queryTreeList,
|
||||
JunkFilter **junkFilter);
|
||||
|
||||
#endif /* FUNCTIONS_H */
|
||||
|
Reference in New Issue
Block a user