Libpq and transactions - Mailing list pgsql-interfaces

From Brijesh Shrivastav
Subject Libpq and transactions
Date
Msg-id 491DC5F3D279CD4EB4B157DDD62237F404E27EFD@zipwire.esri.com
Whole thread Raw
Responses Re: Libpq and transactions
List pgsql-interfaces
Hi! 

I have a question about how transaction behaves in libpq library.
It is very clear in doc that PQexec treats each command (which could 
comprise of more than one sql command) as a single transactions. 
Does PQexecParams() and PQexecPrepared() also behaves the same?
Is there a way to send multiple sql commands separately through
libpq library and rollback if nth command fails. For example, Can I
insert 5 rows using PQexecParams() and rollback all 5 rows if
sixth insert fails?

Regards,
Brijesh


pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgin.tcl pg_exec_prepared slow (was: Released...)
Next
From: Greg Stark
Date:
Subject: Re: pgin.tcl pg_exec_prepared slow (was: Released...)