From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Cyril VELTER <cyril(dot)velter(at)metadys(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [Re] Re: PREPARE and transactions |
Date: | 2004-06-24 16:59:16 |
Message-ID: | 20040624165916.GC2761@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jun 24, 2004 at 05:11:48PM +0200, Cyril VELTER wrote:
>
> Just my 2 cents here. I agree with tom that the curent behevior for the v3
> protocol is the right one. I use "On demand" preparation. The first time a
> statement is needed for a specific connection, it is prepared and the client
> keep track of that (reusing the prepared statement for subsequent calls). If
> the transaction where the statement is prepared is aborted for whatever reason,
> the prepared statement MUST remain valid for this to work, otherwise I need to
> track if the transaction where the statement have been prepared commited or not
> and invalidate it if it's not the case.
This is why I proposed originally to keep the non-transactional behavior
for Parse messages, but transactional for SQL PREPARE. The latter can
be said to be inside the transaction and should behave like so. I think
this lowers the surprise factor.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Bob [Floyd] used to say that he was planning to get a Ph.D. by the "green
stamp method," namely by saving envelopes addressed to him as 'Dr. Floyd'.
After collecting 500 such letters, he mused, a university somewhere in
Arizona would probably grant him a degree. (Don Knuth)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-06-24 16:59:43 | Re: 7.5-dev, pg_dumpall, dollarquoting |
Previous Message | Alvaro Herrera | 2004-06-24 16:55:42 | Re: bug in GUC |