Re: [Re] Re: PREPARE and transactions

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Re] Re: PREPARE and transactions
Date: 2004-07-04 18:39:46
Message-ID: a2fb564d1630789d8a54e4a754d1aae3@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Jeroen T. Vermeulen wrote:

> There's no actual extra parsing involved, as far as I can see, just
> pattern matching and the extraction of the variables.

That sounds like "parsing" to me. :)

[client handling the tracking of PREPARE names]
> In other words, it's only trivial to solve by the client if there
> is no possible conflict over where and how the statement got prepared.
> You say it's trivial, but you're also assuming that the work to ensure
> this has already been done. Most problems become trivial that way!

It's already been done in DBD::Pg. Naming starts at dbdpg_1 and goes to
dbdpg_2, dbdpg_3, etc. The only requirement we ask of the application
using it is that you don't prepare statements yourself named "dbdpg_x".
In most cases, the application does not worry about the naming anyway,
but simply issues an anonymous prepare request through DBIs paradigm of
one statement handle bound to a single SQL statement. DBD::Pg also does
the deallocating itself, and keeps track of the transaction status as well.
Deallocation is merely a courtesy anyway, as we don't reuse the names.

If there are flaws in the above design, I'd like to know about them,
as all of this prepare/execute stuff is rather new and undertested.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200407041434
-----BEGIN PGP SIGNATURE-----

iD8DBQFA6E8uvJuQZxSWSsgRAivsAJwIBtULWbqxIxenRee16iIBtTDvywCfUDNT
pT7cVKHpmq0/Torj+yZkSWA=
=NzIl
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen T. Vermeulen 2004-07-04 19:04:04 Re: [Re] Re: PREPARE and transactions
Previous Message Kaare Rasmussen 2004-07-04 16:41:33 Re: LinuxTag wrapup