]> granicus.if.org Git - postgresql/commitdiff
Keep track of language's trusted flag in InlineCodeBlock. Needed to support DO blocks...
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 6 Nov 2009 21:57:57 +0000 (21:57 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 6 Nov 2009 21:57:57 +0000 (21:57 +0000)
src/backend/commands/functioncmds.c
src/include/nodes/parsenodes.h

index 40097a80c7245760753b5e3409090698f24b477e..09862d28749fa67c9e6e27e952fed50fc9fb92a8 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.112 2009/10/08 02:39:19 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.113 2009/11/06 21:57:57 adunstan Exp $
  *
  * DESCRIPTION
  *       These routines take the parse tree and pick out the
@@ -2023,6 +2023,7 @@ ExecuteDoStmt(DoStmt *stmt)
 
        codeblock->langOid = HeapTupleGetOid(languageTuple);
        languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
+       codeblock->langIsTrusted = languageStruct->lanpltrusted;
 
        if (languageStruct->lanpltrusted)
        {
index 2078526092beb823e93576ab3db89caf58daf617..a4bc7dd072f328b15c010deb2e93e899a6f58006 100644 (file)
@@ -13,7 +13,7 @@
  * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.412 2009/10/28 14:55:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.413 2009/11/06 21:57:57 adunstan Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1959,6 +1959,7 @@ typedef struct InlineCodeBlock
        NodeTag         type;
        char       *source_text;        /* source text of anonymous code block */
        Oid                     langOid;                /* OID of selected language */
+       bool        langIsTrusted;  /* trusted property of the language */
 } InlineCodeBlock;
 
 /* ----------------------