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

Commit04cb9a6

Browse files
committed
Paranoia about data structure lifetime ...
1 parent6779c55 commit04cb9a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/tcop/pquery.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.48 2002/02/27 19:35:16 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.49 2002/02/27 19:52:41 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -158,7 +158,6 @@ ProcessQuery(Query *parsetree,
158158
if (parsetree->isPortal)
159159
{
160160
isRetrieveIntoPortal= true;
161-
intoName=parsetree->into;
162161
/* If binary portal, switch to alternate output format */
163162
if (dest==Remote&&parsetree->isBinary)
164163
dest=RemoteInternal;
@@ -182,10 +181,12 @@ ProcessQuery(Query *parsetree,
182181
*/
183182
if (isRetrieveIntoPortal)
184183
{
184+
intoName=parsetree->into;
185185
portal=PreparePortal(intoName);
186186
oldContext=MemoryContextSwitchTo(PortalGetHeapMemory(portal));
187187
parsetree=copyObject(parsetree);
188188
plan=copyObject(plan);
189+
intoName=parsetree->into;/* use copied name in QueryDesc */
189190

190191
/*
191192
* We stay in portal's memory context for now, so that query desc,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp