Re: Weird prepared stmt behavior

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Weird prepared stmt behavior
Дата
Msg-id 20040501172047.GE2333@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Weird prepared stmt behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Weird prepared stmt behavior
Список pgsql-hackers
On Fri, Apr 30, 2004 at 09:44:52PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > Is this expected?  If so, why?  I'd expect the prepared stmt to be
> > deallocated.
> 
> prepare.c probably should have provisions for rolling back its state to
> the start of a failed transaction ... but it doesn't.
> 
> Before jumping into doing that, though, I'd want to have some
> discussions about the implications for the V3 protocol's notion of
> prepared statements.  The protocol spec does not say anything that
> would suggest that prepared statements are lost on transaction rollback,
> and offhand it seems like they shouldn't be because the protocol is
> lower-level than transactions.

Right now there is no distinction between a PREPARE prepared statement
and a protocol-level one.  If we want to have the v3proto's statements
behave different from PREPARE's, it's just a matter of adding a new
field into the PreparedStatement.  I can do that and make them behave
different if people think this is how it should be.

I don't really have an opinion on whether protocol-level should behave
different.  What do people think?

-- 
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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Current CVS tip segfaulting
Следующее
От: Tom Lane
Дата:
Сообщение: Re: mingw configure failure workaround