Tks for all the answers!!! Luis Silva

----- Original Message ----- 
From: "Jeroen T. Vermeulen" <[EMAIL PROTECTED]>
To: "Luis Silva" <[EMAIL PROTECTED]>
Cc: "Bart Samwel" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, April 17, 2006 5:59 AM
Subject: Re: [libpqxx-general] Trigger Notify get_notifs() vs 
await_notification()


> On Thu, April 13, 2006 17:40, Luis Silva wrote:
>> I did that for resolving my problem, but I wanted to know why this
>> happens.
>
> The transaction keeps track of things that "attach" to it in a special way
> that represents a different mode of operation.  While a pipeline is
> operating on a transaction, for instance, just about everything works
> differently from usual.  When a tablewriter is attached, libpq itself is
> switched to a temporary different mode where queries can't be issued etc.
> If you tried to have a pipeline and a tablewriter active on the same
> transaction simultaneously (or two pipelines, or two tablewriters) then
> things would break in the most horrible way.
>
> So the transaction keeps track of these things; it allows only one of
> these special "context" objects to be attached at a time, and tries to
> warn of mistakes early.  You don't want bugs with this stuff popping up
> only if an obscure "if" is taken that you didn't have the chance to test.
> Also, we want to make sure that the transaction is left not in any of
> these special modes when you close it--or simple statements like "ABORT"
> could make things worse instead of better.
>
> Another thing that can happen is that you try to commit a transaction
> while there are still queries in a pipeline whose results haven't been
> retrieved yet (for example--there are other nasty possibilities).  I
> figured that is probably not what the client programmer wanted, so he
> should be warned even if there is no error during cleanup.  If the
> pipeline were allowed to complete and there *was* an error during cleanup,
> things would get even more complex.
>
>
> Jeroen
>
>
> 
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to