Re: Weird prepared stmt behavior - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Weird prepared stmt behavior
Date
Msg-id 87zn8p1d4h.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Weird prepared stmt behavior  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Weird prepared stmt behavior  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.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".

Off the top of my head that doesn't seem like a problem. Though I wonder how
that meshes with other database's views on the point.

> Then prepare_cached could send a v3 Prepare and assume the statement
> will be available for the rest of the session.

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.

-- 
greg



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: mingw configure failure workaround
Next
From: Greg Stark
Date:
Subject: Re: PostgreSQL pre-fork speedup