mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Add optional "validator" function to languages that can validate the
function body (and other properties) as a function in the language is created. This generalizes ad hoc code that already existed for the built-in languages. The validation now happens after the pg_proc tuple of the new function is created, so it is possible to define recursive SQL functions. Add some regression test cases that cover bogus function definition attempts.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.178 2002/05/17 18:32:52 petere Exp $
|
||||
* $Id: parsenodes.h,v 1.179 2002/05/22 17:21:01 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -990,6 +990,7 @@ typedef struct CreatePLangStmt
|
||||
NodeTag type;
|
||||
char *plname; /* PL name */
|
||||
List *plhandler; /* PL call handler function (qual. name) */
|
||||
List *plvalidator; /* optional validator function (qual. name) */
|
||||
char *plcompiler; /* lancompiler text */
|
||||
bool pltrusted; /* PL is trusted */
|
||||
} CreatePLangStmt;
|
||||
|
||||
Reference in New Issue
Block a user