diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-12-14 02:15:54 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-12-14 02:15:54 +0000 |
commit | a620d5005df6e4b6fc09ba914f19402dc07289dd (patch) | |
tree | c7213f3647c9b6600ed3d95e352790d8ae0f7744 /src/include/executor/functions.h | |
parent | 84f910a7076e09e551bf69e0972473ec15d33c79 (diff) | |
download | postgresql-a620d5005df6e4b6fc09ba914f19402dc07289dd.tar.gz postgresql-a620d5005df6e4b6fc09ba914f19402dc07289dd.zip |
Fix a bug introduced when set-returning SQL functions were made inline-able:
we have to cope with the possibility that the declared result rowtype contains
dropped columns. This fails in 8.4, as per bug #5240.
While at it, be more paranoid about inserting binary coercions when inlining.
The pre-8.4 code did not really need to worry about that because it could not
inline at all in any case where an added coercion could change the behavior
of the function's statement. However, when inlining a SRF we allow sorting,
grouping, and set-ops such as UNION. In these cases, modifying one of the
targetlist entries that the sort/group/setop depends on could conceivably
change the behavior of the function's statement --- so don't inline when
such a case applies.
Diffstat (limited to 'src/include/executor/functions.h')
-rw-r--r-- | src/include/executor/functions.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index 10435f8617e..ab0cf8e75ad 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/executor/functions.h,v 1.33 2009/01/01 17:23:59 momjian Exp $ + * $PostgreSQL: pgsql/src/include/executor/functions.h,v 1.34 2009/12/14 02:15:54 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -22,7 +22,7 @@ extern Datum fmgr_sql(PG_FUNCTION_ARGS); extern bool check_sql_fn_retval(Oid func_id, Oid rettype, List *queryTreeList, - bool insertRelabels, + bool *modifyTargetList, JunkFilter **junkFilter); extern DestReceiver *CreateSQLFunctionDestReceiver(void); |