Transaction Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gouse
    New Member
    • Feb 2007
    • 18

    Transaction Problem

    Hi Friends,

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

    ex: \set ON_ERROR_ROLLBA CK 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_ROLLBA CK property using the libpq interface.


    ThanQ
  • michaelb
    Recognized Expert Contributor
    • Nov 2006
    • 534

    #2
    Transaction does not have property ON_ERROR_ROLLBA CK - 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.

    Comment

    Working...