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

Commita232f30

Browse files
committed
Volatile-ize all five places where we expect a PG_TRY block to restore
old memory context in plpython. Before only one of them was markedvolatile, but per report from Zdenek Kotala, some compilers do thewrong thing here.
1 parent858d169 commita232f30

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/pl/plpython/plpython.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**********************************************************************
22
* plpython.c - python as a procedural language for PostgreSQL
33
*
4-
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.137 2010/02/14 18:42:19 rhaas Exp $
4+
*$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.138 2010/02/18 23:50:06 tgl Exp $
55
*
66
*********************************************************************
77
*/
@@ -2763,7 +2763,7 @@ PLy_spi_prepare(PyObject *self, PyObject *args)
27632763
PyObject*volatileoptr=NULL;
27642764
char*query;
27652765
void*tmpplan;
2766-
MemoryContextoldcontext;
2766+
volatileMemoryContextoldcontext;
27672767

27682768
/* Can't execute more if we have an unhandled error */
27692769
if (PLy_error_in_progress)
@@ -2934,7 +2934,7 @@ PLy_spi_execute_plan(PyObject *ob, PyObject *list, long limit)
29342934
inti,
29352935
rv;
29362936
PLyPlanObject*plan;
2937-
MemoryContextoldcontext;
2937+
volatileMemoryContextoldcontext;
29382938

29392939
if (list!=NULL)
29402940
{
@@ -3081,7 +3081,7 @@ static PyObject *
30813081
PLy_spi_execute_query(char*query,longlimit)
30823082
{
30833083
intrv;
3084-
MemoryContextoldcontext;
3084+
volatileMemoryContextoldcontext;
30853085

30863086
oldcontext=CurrentMemoryContext;
30873087
PG_TRY();
@@ -3116,7 +3116,7 @@ static PyObject *
31163116
PLy_spi_execute_fetch_result(SPITupleTable*tuptable,introws,intstatus)
31173117
{
31183118
PLyResultObject*result;
3119-
MemoryContextoldcontext;
3119+
volatileMemoryContextoldcontext;
31203120

31213121
result= (PLyResultObject*)PLy_result_new();
31223122
Py_DECREF(result->status);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp