Subject: A problem with transaction and triggering

From: [email-masked] (Venkata Chaganti)
Date: Thu, 11 Mar 93 08:31:27 -0800

We have Postgres V4.0 on sun Machine.
I am new user of the postgres. if the question is FAQ`s
please excuseme.

My question is 
How can we do Transaction ? in postgres.

For example I want to do the fallowing transaction
in SQL How can I write in postquel

INSERT INTO SP(S#,P#,QTY)
values ('s5','p1',1000)
if(@@ERROR !=0) ROLLBACK
UPDATE P SET TOTQTY=TOTQTY+1000
WHERE P# =`P1`
IF(@@ERROR != 0) ROLLBACK
ELSE COMMIT

I WANT TO DO THIS USING POSTQUEL. COULD SOME ONE THERE HELE ME TO LEARN POSTGRES

I WOULD LIKE TO KNOW IF THERE ANY EXAMPLES FOR POSTGRES TRANSACTION OR TRIGGERING 
PLEASE LET ME KNOW OR MAIL ME
THANKS
KRIS
----------------
[email-masked]