Обсуждение: System Messages

Поиск
Список
Период
Сортировка

System Messages

От
"Samuel J. Sutjiono"
Дата:
I have a function (stored procedures) that updates or inserts a customer record (see below).
 
IF found then
   Update Customer 
   Set custname = icustname
   retmsg := ''record already exists - updated'';
ELSE   
   Insert into Customer (custname) VALUES (icustname);
   retmsg := ''successful'';
END IF;
 
Can anybody tell me how I can be sure that the record is updated or inserted into the database ? Is there any system message in PostgreSQL that I can query ?
 
Thanks for your help.