Re: Transaction handling in extended query mode and Sync

From: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
To: Carlos Guzman Alvarez <carlosga(at)telefonica(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transaction handling in extended query mode and Sync
Date: 2003-07-12 01:10:05
Message-ID: 3F0F5FED.6060400@yahoo.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sailesh Krishnamurthy 2003-07-12 07:39:06 agg/order-by question
Previous Message Tom Lane 2003-07-12 00:32:55 Re: btree fast-root on VACUUM FULL