I am new to working with PostgreSQL and need to create a pgSQL process that I can run against a 8.4 PostgreSQL database. The code will need to look something like:
BEGIN;
SAVEPOINT sp1;
UPDATE location SET delete = 1 WHERE delete=0 RETRUNING count;
[code to rollback if there is an error or commit if everything was good]
It is that code for knowing that there was an error and doing the Rollback that I can’t remember how to do. I looked through the PostgreSQL Documentation for an example but I couldn’t find it. It has been a very long time since I wrote SQL code.
Oh, another small question, since this is not being embedded in an program like C#, VB, etc, the two tool I have are pgADMIN III and SSH. Can this be done in pgADMIN III?
Thanks to those that will help me with a simple solution.
Greg Della-Croce
Applications Administrator
Greg_Della-Croce@Wycliffe.org
SKYPE: GDellaCroce55
Cell: 407-408-2572
THINK ON THIS:
"All that is valuable in human society depends upon the opportunity for development accorded the individual" ~ Albert Einstein
“All this is valuable in Christ’s Kingdom depens upon the opportunity for development accorded the individual by the Holy Spirit to Glorify the Father” ~ Greg Della-Croce