Transaction handling in extended query mode and Sync message issues - Mailing list pgsql-hackers

From Carlos Guzman Alvarez
Subject Transaction handling in extended query mode and Sync message issues
Date
Msg-id 3F0C04FE.2070002@telefonica.net
Whole thread Raw
Responses Re: Transaction handling in extended query mode and Sync  ("Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>)
Re: Transaction handling in extended query mode and Sync message issues  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello:

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.

In the extended query mode documentation i see this:

"Note:  Sync does not cause a transaction block opened with BEGIN  to be 
closed. It is possible to detect this situation since the ReadyForQuery 
message includes transaction status information."

I have tested the same cycle with a BEGIN WORK but having the same 
problem, any idea on what i'm doing wrong ???



Tanks in advance :)






-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain




pgsql-hackers by date:

Previous
From: Carlos Guzman Alvarez
Date:
Subject: Re: CREATE DATABASE command in Extended Query mode of 3.0
Next
From: Rod Taylor
Date:
Subject: Re: sugsestions