diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2002-05-22 17:21:02 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2002-05-22 17:21:02 +0000 |
commit | d60f10b0e74173653d17c09750a791afe6f56404 (patch) | |
tree | 9803f14bc9ce71e3a056a447b6999847bb2a8dd6 /src/backend/nodes/copyfuncs.c | |
parent | df9c8e1a39dc0502c62e164aa94e7e810bcd2009 (diff) | |
download | postgresql-d60f10b0e74173653d17c09750a791afe6f56404.tar.gz postgresql-d60f10b0e74173653d17c09750a791afe6f56404.zip |
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.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 1f0cc11934f..5bc16dc9b82 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.187 2002/05/17 18:32:52 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.188 2002/05/22 17:20:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2418,6 +2418,7 @@ _copyCreatePLangStmt(CreatePLangStmt *from) if (from->plname) newnode->plname = pstrdup(from->plname); Node_Copy(from, newnode, plhandler); + Node_Copy(from, newnode, plvalidator); if (from->plcompiler) newnode->plcompiler = pstrdup(from->plcompiler); newnode->pltrusted = from->pltrusted; |