System Messages

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

System Messages

От:
"Samuel J. Sutjiono" <ssutjiono@wc-group.com>
Дата:
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. 
FAQ