mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Clarify documentation on the behavior of unnamed bind queries.
This commit is contained in:
parent
27cb626f7a
commit
93a57c3b57
@ -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">
|
<chapter id="protocol">
|
||||||
<title>Frontend/Backend Protocol</title>
|
<title>Frontend/Backend Protocol</title>
|
||||||
@ -737,9 +737,9 @@
|
|||||||
<para>
|
<para>
|
||||||
The unnamed prepared statement is likewise planned during Parse processing
|
The unnamed prepared statement is likewise planned during Parse processing
|
||||||
if the Parse message defines no parameters. But if there are parameters,
|
if the Parse message defines no parameters. But if there are parameters,
|
||||||
query planning occurs during Bind processing instead. This allows the
|
query planning occurs every time Bind parameters are supplied. This allows the
|
||||||
planner to make use of the actual values of the parameters provided in
|
planner to make use of the actual values of the parameters provided by
|
||||||
the Bind message when planning the query.
|
each Bind message, rather than use generic estimates.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
@ -1469,7 +1469,7 @@ exec_bind_message(StringInfo input_message)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* special-case the unnamed statement */
|
/* Unnamed statements are re-prepared for every bind */
|
||||||
psrc = unnamed_stmt_psrc;
|
psrc = unnamed_stmt_psrc;
|
||||||
if (!psrc)
|
if (!psrc)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
Loading…
Reference in New Issue
Block a user