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:
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.
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
pgsql-novice by date
|Next:||From: JORGE MALDONADO||Date: 2012-07-10 17:37:44|
|Subject: How to apply a regular expression to a select statement|
|Previous:||From: Ioannis Anagnostopoulos||Date: 2012-07-08 22:56:07|
|Subject: Re: Aggregate from CASE WHEN...|