Content-Length: 317477 | pFad | http://github.com/postgrespro/postgres/commit/b79f49c780ac35907392916138475452191412c6

50 Keep track of language's trusted flag in InlineCodeBlock. Needed to s… · postgrespro/postgres@b79f49c · GitHub
Skip to content

Commit b79f49c

Browse files
committed
Keep track of language's trusted flag in InlineCodeBlock. Needed to support DO blocks for languages that have both trusted and untrusted variants.
1 parent 0772f1e commit b79f49c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/commands/functioncmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.112 2009/10/08 02:39:19 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.113 2009/11/06 21:57:57 adunstan Exp $
1414
*
1515
* DESCRIPTION
1616
* These routines take the parse tree and pick out the
@@ -2023,6 +2023,7 @@ ExecuteDoStmt(DoStmt *stmt)
20232023

20242024
codeblock->langOid = HeapTupleGetOid(languageTuple);
20252025
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
2026+
codeblock->langIsTrusted = languageStruct->lanpltrusted;
20262027

20272028
if (languageStruct->lanpltrusted)
20282029
{

src/include/nodes/parsenodes.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
16-
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.412 2009/10/28 14:55:46 tgl Exp $
16+
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.413 2009/11/06 21:57:57 adunstan Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -1959,6 +1959,7 @@ typedef struct InlineCodeBlock
19591959
NodeTag type;
19601960
char *source_text; /* source text of anonymous code block */
19611961
Oid langOid; /* OID of selected language */
1962+
bool langIsTrusted; /* trusted property of the language */
19621963
} InlineCodeBlock;
19631964

19641965
/* ----------------------

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/b79f49c780ac35907392916138475452191412c6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy