postgresql/src/include/executor/functions.h
Tom Lane a8487e15ed 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.
2004-10-07 18:38:51 +00:00

27 lines
766 B
C

/*-------------------------------------------------------------------------
*
* functions.h
* Declarations for execution of SQL-language functions.
*
*
* 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.23 2004/10/07 18:38:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef FUNCTIONS_H
#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 */