RAISE EXCEPTION not working

From: "Brian H Mayo" <bmayo(at)comcast(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: RAISE EXCEPTION not working
Date: 2003-11-20 23:08:55
Message-ID: !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAG3YoS0+KdkSnINSjzQKMisKAAAAQAAAA7z14CMS7K0KIMl5K7nqVxAEAAAAA@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying the use the following statements in a function:
SELECT INTO temp_i id FROM public.t_customer_profile WHERE
id=cust_id;
IF NOT FOUND THEN
RAISE EXCEPTION "Username already exists";
END IF;

I know the table and the select statement is correct.
And I keep receiving the following error:
WARNING: plpgsql: ERROR during compile of f_insert_login_profile_record
near line 19

ERROR: syntax error at or near ""Username already exists""

I do not understand why.

Thank you.
Brian H Mayo
<mailto:bmayo(at)comcast(dot)net> bmayo(at)comcast(dot)net

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2003-11-20 23:33:57 Psql bug?
Previous Message Tom Lane 2003-11-20 22:39:50 Re: ERROR: nodeRead: did not find '}' [x2]