Re: Weird prepared stmt behavior

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird prepared stmt behavior
Date: 2004-05-03 20:29:13
Message-ID: 20040503202913.GA4638@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 03, 2004 at 04:15:10PM -0400, Greg Stark wrote:

> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
>
> > I don't see how this collides with the ideas presented so far. The JDBC
> > driver wants the same: they want to prepare some statements and be able
> > to use them later in the session. They don't want to be paying
> > attention to which prepares were committed and which ones weren't.
>
> Oh I thought the idea was that the statement would only be available within a
> transaction.
>
> You're saying they span transactions but if the transaction rolls back then it
> also rolls back the statement "creation".

Right. But note that Tom wants to distinguish between statements
created via PREPARE (which would rollback) from those created via a
Prepare message (which wouldn't).

> Incidentally I tried to find documentation on the v3 binary prepare/execute
> protocol and failed. I think I ended up looking at libpq calls which is too
> high level to understand what the protocol is and isn't capable of. I have
> some ideas of what the next step could be.

> Where should I be looking? Source code would be fine if the wire protocol
> isn't in the documentation.

http://www.postgresql.org/docs/7.4/static/protocol-flow.html#AEN52666

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-05-03 20:29:39 Re: PostgreSQL pre-fork speedup
Previous Message Greg Stark 2004-05-03 20:15:10 Re: Weird prepared stmt behavior