Raise Notice

From: "Prasad dev" <esteem3300(at)hotmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Raise Notice
Date: 2005-06-20 00:27:41
Message-ID: BAY103-F3758E553854EBDF9A9845AC0E90@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<html><div style='background-color:'><DIV class=RTE>Hi, </DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;I have been trying to figure out why this simple query doesn't execute if no record exist ! </DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>CREATE OR REPLACE FUNCTION del_rest() RETURNS TRIGGER AS '<BR>DECLARE<BR>&nbsp;&nbsp;&nbsp; t record;<BR>&nbsp; BEGIN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT * INTO t FROM del2 WHERE (d2=OLD.d2 or old.d2 is null) and (d3=OLD.d3 or&nbsp; old.d2 is null);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IF NOT FOUND THEN<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RAISE NOTICE ''No such record exits in table del2'';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END IF;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return null;&nbsp;&nbsp; <BR>&nbsp;&nbsp; END;<BR>'LANGUAGE 'plpgsql';</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Looking forward for suggestions. Thanks</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Prasad.</DIV></div></html>

Attachment Content-Type Size
unknown_filename text/html 1.0 KB

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-06-20 01:11:27 Re: help with function .. .. date data type
Previous Message Tom Lane 2005-06-19 18:20:50 Re: BIG files