From: | Margarita Barvinok <brita(at)umich(dot)edu> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Transaction: Begin, Lock |
Date: | 1999-09-13 14:58:43 |
Message-ID: | Pine.SOL.4.10.9909131044130.5490-100000@joust.rs.itd.umich.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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;
EXEC SQL 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
-------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Orsinger | 1999-09-13 18:49:03 | RE: [INTERFACES] ecpg and getting just assigned serial number |
Previous Message | Kevin Mulholland | 1999-09-13 14:53:48 | subscribe |