Re: Small question

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Small question
Дата
Msg-id 200203221919.g2MJJ5M16228@saturn.janwieck.net
обсуждение исходный текст
Ответ на Re: Small question  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Small question
Список pgsql-general
Bruce Momjian wrote:
> Tom Lane wrote:
> > Jan Wieck <janwieck@yahoo.com> writes:
> > > Joep deVocht wrote:
> > >> Is there a way to determine whether a transaction
> > >> is started and not ended yet?
> >
> > >     I think it's time to add  a  little  boolean  function,  that
> > >     actually  returns IsTransactionBlock(), and have a libpq side
> > >     wrapper around PQfn() calling it.
> >
> > If you're in TRANSACTION ABORT state, I do not think that will work.
> >
> > Offhand this seems more of a protocol issue.  A straightforward solution
> > would be to add a status indicator (with three states: out of
> > transaction, in transaction, in aborted transaction) to the
> > ReadyForQuery message, but we can't do that without a protocol change,
> > which is probably more trouble than it's worth.
>
> Yes, I was wondering if it was worth having the client call the function
> at the end of every query.

    Who  said  that  it'll  be called after every query?  It will
    only be called when the  application  asks  for  the  current
    state. Sort of client side

        bool PQisTransactionBlock(PGconn *conn);

    I don't really see how that functionality could be a problem.

    I agree with Tom so far, that it  has  to  be  in  the  FE/BE
    protocol.  It just seems none of us likes protocol changes.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

Предыдущее
От: "Joel Burton"
Дата:
Сообщение: initdb dies during IpcSemaphoreCreate under BSD jail
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Small question