RAISE EXCEPTION not working - Mailing list pgsql-general

From Brian H Mayo
Subject RAISE EXCEPTION not working
Date
Msg-id !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAG3YoS0+KdkSnINSjzQKMisKAAAAQAAAA7z14CMS7K0KIMl5K7nqVxAEAAAAA@comcast.net
Whole thread Raw
Responses Re: RAISE EXCEPTION not working
List 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

bmayo@comcast.net

 

pgsql-general by date:

Previous
From: Holger Klawitter
Date:
Subject: Re: SELECT Question
Next
From: Robert Partyka
Date:
Subject: proposition of functionality to add