mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Add prokind column, replacing proisagg and proiswindow
The new column distinguishes normal functions, procedures, aggregates, and window functions. This replaces the existing columns proisagg and proiswindow, and replaces the convention that procedures are indicated by prorettype == 0. Also change prorettype to be VOIDOID for procedures. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Michael Paquier <michael@paquier.xyz>
This commit is contained in:
@@ -4484,12 +4484,12 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
|
||||
|
||||
/*
|
||||
* Forget it if the function is not SQL-language or has other showstopper
|
||||
* properties. (The nargs check is just paranoia.)
|
||||
* properties. (The prokind and nargs checks are just paranoia.)
|
||||
*/
|
||||
if (funcform->prolang != SQLlanguageId ||
|
||||
funcform->prosecdef ||
|
||||
funcform->prokind != PROKIND_FUNCTION ||
|
||||
funcform->proretset ||
|
||||
funcform->prorettype == InvalidOid ||
|
||||
funcform->prorettype == RECORDOID ||
|
||||
!heap_attisnull(func_tuple, Anum_pg_proc_proconfig) ||
|
||||
funcform->pronargs != list_length(args))
|
||||
|
||||
Reference in New Issue
Block a user