Transaction: Begin, Lock - Mailing list pgsql-interfaces

From Margarita Barvinok
Subject Transaction: Begin, Lock
Date
Msg-id Pine.SOL.4.10.9909131044130.5490-100000@joust.rs.itd.umich.edu
Whole thread Raw
Responses Re: [INTERFACES] Transaction: Begin, Lock
List pgsql-interfaces
Hi,

I have two questions about transactions.
This is part of my C code.

EXEC SQL CONNECT TO ...
for (i=2; i<x: i++) { strncpy(oid_c, entries[i].val, 10);  /* get oid */ oid_rec = atoi(oid_c); EXEC SQL BEGIN WORK;
EXECSQL DELETE FROM phonebook          WHERE oid = :oid_rec; EXEC SQL COMMIT WORK;
 
}
EXEC SQL DISCONNECT;

1. Why i get the following message when I run this code?
NOTICE: BeginTransactionBlock and not in default state

2. How should I lock the table phonebook during this transaction?

Thank you,

-Margarita
-------------------------------
Margarita Barvinok
System Administrator II
University of Michigan
Department of Biology
-------------------------------



pgsql-interfaces by date:

Previous
From: Kevin Mulholland
Date:
Subject: subscribe
Next
From: Craig Orsinger
Date:
Subject: RE: [INTERFACES] ecpg and getting just assigned serial number