Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb79f49c

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 parent0772f1e commitb79f49c

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
NodeTagtype;
19601960
char*source_text;/* source text of anonymous code block */
19611961
OidlangOid;/* OID of selected language */
1962+
boollangIsTrusted;/* trusted property of the language */
19621963
}InlineCodeBlock;
19631964

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp