By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Transaction Problem

P: 18
Hi Friends,

I would like to set the properties of a transaction like ON_ERROR_ROLLBACK . To set This parameter There is a psql command (meta command) \set.

ex: \set ON_ERROR_ROLLBACK on

from the psql terminal it was working fine. But my problem is I am working with the libpq 'C' library in VC++. by uing this libpq library I am connecting to the database server. There is no sql command to use the above \set command (of psql terminal).

How to set the ON_ERROR_ROLLBACK property using the libpq interface.


ThanQ
Jun 27 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 534
Transaction does not have property ON_ERROR_ROLLBACK - it just rolls back on error because this is the major feature of transaction - do all or nothing.

I think it would help you to review these links:
Begin transaction
Rollback
Rollabck to Savepoint
libpq
Example Program using libpq

There are more good and helpful pages in the Postgres manual, just look for references and hyperlinks as you read those I posted above.
Jul 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.