Greg Stark wrote:
> On Mon, Feb 15, 2010 at 7:11 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > 1. Why do we only do bind-level planning for anonymous wire-level queries?
> > 2. I realize we did anonymous-only because that was the only way we had
> > in the protocol to _signal_ bind-time planning, but didn't we think of
> > this when we were implementing the wire-level protocol?
> Is there any other difference between anonymous and non-anonymous
> queries? If this is the only major difference do we need to separate
> them? Is there any particular reason a driver would need two prepared
> queries if they're both just going to be planned at execution time?
Well, anonymous prepared queries are replanned for _every_ bind, so I
don't see a huge value in allowing multiple unnamed queries, except you
have to re-send the old query to prepare if you need to reuse it.
In fact, this behavior was not totally clear so I updated the
documentation a little with the attached patch.
> Incidentally, can you have two active anonymous portals at the same time?
No, the first one is deleted when the second is created, i.e., our docs
An unnamed prepared statement lasts only until the next Parse statement
specifying the unnamed statement as destination is issued. (Note that a
simple Query message also destroys the unnamed statement.)
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
+ If your life is a hard drive, Christ can be your backup. +
Description: text/x-diff (1.8 KB)
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2010-02-16 20:19:40|
|Subject: Re: [COMMITTERS] pgsql: Remove old-style VACUUM FULL
(which was known for a little while|
|Previous:||From: Kevin Ar18||Date: 2010-02-16 19:58:28|