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

Commit8f6a6b7

Browse files
committed
Ensure that an Execute operation can't send tuples in cases where
Describe would claim that no tuples will be returned. Only affectsSELECTs added to non-SELECT base queries by rewrite rules. If youwant to see the output of such a select, you gotta use 'simple Query'protocol.
1 parent7991391 commit8f6a6b7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎src/backend/tcop/pquery.c

Lines changed: 18 additions & 1 deletion
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.62 2003/05/0620:26:27 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.63 2003/05/0621:01:04 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -727,6 +727,23 @@ PortalRunMulti(Portal portal,
727727
List*plantree_list=portal->planTrees;
728728
List*querylist_item;
729729

730+
/*
731+
* If the destination is RemoteExecute, change to None. The reason
732+
* is that the client won't be expecting any tuples, and indeed has no
733+
* way to know what they are, since there is no provision for Describe
734+
* to send a RowDescription message when this portal execution strategy
735+
* is in effect. This presently will only affect SELECT commands added
736+
* to non-SELECT queries by rewrite rules: such commands will be executed,
737+
* but the results will be discarded unless you use "simple Query"
738+
* protocol.
739+
*/
740+
if (dest->mydest==RemoteExecute||
741+
dest->mydest==RemoteExecuteInternal)
742+
dest=None_Receiver;
743+
if (altdest->mydest==RemoteExecute||
744+
altdest->mydest==RemoteExecuteInternal)
745+
altdest=None_Receiver;
746+
730747
/*
731748
* Loop to handle the individual queries generated from a
732749
* single parsetree by analysis and rewrite.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp