Re: [Re] Re: PREPARE and transactions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [Re] Re: PREPARE and transactions
Дата
Msg-id 20040624165916.GC2761@dcc.uchile.cl
обсуждение исходный текст
Ответ на [Re] Re: PREPARE and transactions  ("Cyril VELTER" <cyril.velter@metadys.com>)
Ответы Re: [Re] Re: PREPARE and transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
[Re] Re: [Re] Re: PREPARE and transactions  ("Cyril VELTER" <cyril.velter@metadys.com>)
Список 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)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.5-dev, pg_dumpall, dollarquoting
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bug in GUC