Skip to content

Commit 93a57c3

Browse files
committed
Clarify documentation on the behavior of unnamed bind queries.
1 parent 27cb626 commit 93a57c3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/src/sgml/protocol.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.78 2010/02/03 09:47:19 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.79 2010/02/16 20:15:14 momjian Exp $ -->
22

33
<chapter id="protocol">
44
<title>Frontend/Backend Protocol</title>
@@ -737,9 +737,9 @@
737737
<para>
738738
The unnamed prepared statement is likewise planned during Parse processing
739739
if the Parse message defines no parameters. But if there are parameters,
740-
query planning occurs during Bind processing instead. This allows the
741-
planner to make use of the actual values of the parameters provided in
742-
the Bind message when planning the query.
740+
query planning occurs every time Bind parameters are supplied. This allows the
741+
planner to make use of the actual values of the parameters provided by
742+
each Bind message, rather than use generic estimates.
743743
</para>
744744

745745
<note>

src/backend/tcop/postgres.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.588 2010/02/13 01:32:19 sriggs Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.589 2010/02/16 20:15:14 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -1469,7 +1469,7 @@ exec_bind_message(StringInfo input_message)
14691469
}
14701470
else
14711471
{
1472-
/* special-case the unnamed statement */
1472+
/* Unnamed statements are re-prepared for every bind */
14731473
psrc = unnamed_stmt_psrc;
14741474
if (!psrc)
14751475
ereport(ERROR,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy