aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2010-02-16 20:15:14 +0000
committerBruce Momjian <bruce@momjian.us>2010-02-16 20:15:14 +0000
commit93a57c3b57530c11429815260a8b67269394c8b3 (patch)
treed262cc49d4847ba3e5c910b40ef88660a8f57f11
parent27cb626f7a28abd18c0e8a34fc8d6674b0f6cdf3 (diff)
downloadpostgresql-93a57c3b57530c11429815260a8b67269394c8b3.tar.gz
postgresql-93a57c3b57530c11429815260a8b67269394c8b3.zip
Clarify documentation on the behavior of unnamed bind queries.
-rw-r--r--doc/src/sgml/protocol.sgml8
-rw-r--r--src/backend/tcop/postgres.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 845e4181307..5b69f373243 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.78 2010/02/03 09:47:19 heikki Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.79 2010/02/16 20:15:14 momjian Exp $ -->
<chapter id="protocol">
<title>Frontend/Backend Protocol</title>
@@ -737,9 +737,9 @@
<para>
The unnamed prepared statement is likewise planned during Parse processing
if the Parse message defines no parameters. But if there are parameters,
- query planning occurs during Bind processing instead. This allows the
- planner to make use of the actual values of the parameters provided in
- the Bind message when planning the query.
+ query planning occurs every time Bind parameters are supplied. This allows the
+ planner to make use of the actual values of the parameters provided by
+ each Bind message, rather than use generic estimates.
</para>
<note>
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 8d33000e616..15d0808ad24 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.588 2010/02/13 01:32:19 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.589 2010/02/16 20:15:14 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -1469,7 +1469,7 @@ exec_bind_message(StringInfo input_message)
}
else
{
- /* special-case the unnamed statement */
+ /* Unnamed statements are re-prepared for every bind */
psrc = unnamed_stmt_psrc;
if (!psrc)
ereport(ERROR,