System Messages

From: "Samuel J(dot) Sutjiono" <ssutjiono(at)wc-group(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: System Messages
Date: 2002-02-27 15:39:28
Message-ID: 00f701c1bfa4$f19b67c0$110a010a@headquarters.wcgroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eugene Chiu 2002-02-27 16:04:49 Client only deployment
Previous Message David Blood 2002-02-27 15:32:30 sort mem size

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2002-02-27 16:25:01 Re: implementation of a many-to-many relationship
Previous Message Dan Langille 2002-02-27 15:15:53 Re: implementation of a many-to-many relationship