Re: Transaction handling in extended query mode and Sync - Mailing list pgsql-hackers

From Francisco Figueiredo Jr.
Subject Re: Transaction handling in extended query mode and Sync
Date
Msg-id 3F0F5FED.6060400@yahoo.com.br
Whole thread Raw
In response to Transaction handling in extended query mode and Sync message issues  (Carlos Guzman Alvarez <carlosga@telefonica.net>)
Responses Re: Transaction handling in extended query mode and Sync  (Carlos Guzman Alvarez <carlosga@telefonica.net>)
List pgsql-hackers
Carlos Guzman Alvarez wrote:
> Hello:
> 

Hello Carlos.

> I continue to work in the implementation of the 3.0 protocol in C#, i'm 
> making a test that consist on:
> 
> - Create a database.
> - Create a table in the new database.
> - Start transaction.
> - Insert 100 rows of data in the new table.
> - Commit transaction.
> 
> For start a transaction i send a Query message with this as statement text:
> 
> START TRANSACTION ISOLATION LEVEL READ COMMITTED
> 
> For commit a transaction i send a Query message with this as statement 
> text:
> 
> COMMIT TRANSACTION
> 
> For execute the inserts i use parametrized commands with Extended query 
> mode, sending this sequence of messages:
> 
> - Parse & Flush ( Only for the first command )
> - Describe & Flush ( Only for the first command )
> - Close Portal ( begining at second command )
> - Bind & Flush
> - Execute & Sync
> 
> But the Sync message seems to be commiting the transaction, if i send a 
> Flush message all works as expected with inserts, but create database & 
> table will not work.
> 

Sorry for late response...
I could finally get Npgsql to talk protocol 3.0 version :) It is not 
100% but it is near...
I give it a try in a test similar to yours... I didn't send the create 
database commands just the row insertion.

in both sequences, I could get the desired behaviour.
I could send the begin transaction in simple query mode, send the insert 
in extended mode and send a commit or rollback in simple mode sending 
the sync message in the end of extended mode.


Are you still having problems with it?

I hope it helps.


-- 
Regards,

Francisco Figueiredo Jr.

------
"My grandfather once told me that there are two
kinds of people: those
who work and those who take the credit. He told me
to try to be in the
first group; there was less competition there."
- Indira Gandhi



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: btree fast-root on VACUUM FULL
Next
From: "Zeno R.R. Davatz"
Date:
Subject: corrupt data