mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
Arrange to "inline" SQL functions that appear in a query's FROM clause,
are declared to return set, and consist of just a single SELECT. We can replace the FROM-item with a sub-SELECT and then optimize much as if we were dealing with a view. Patch from Richard Rowell, cleaned up by me.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.148 2008/01/01 19:45:48 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/catalog/pg_proc.c,v 1.149 2008/03/18 22:04:14 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -601,7 +601,8 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
|
||||
proc->proargtypes.values,
|
||||
proc->pronargs);
|
||||
(void) check_sql_fn_retval(funcoid, proc->prorettype,
|
||||
querytree_list, NULL);
|
||||
querytree_list,
|
||||
false, NULL);
|
||||
}
|
||||
else
|
||||
querytree_list = pg_parse_query(prosrc);
|
||||
|
||||
Reference in New Issue
Block a user