Re: RAISE EXCEPTION not working

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Brian H Mayo <bmayo(at)comcast(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: RAISE EXCEPTION not working
Date: 2003-11-24 19:32:45
Message-ID: 20031124113148.K84194@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thu, 20 Nov 2003, Brian H Mayo wrote:

> 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";
I think you want:
RAISE EXCEPTION ''Username already exists'';
(quoted text literals in SQL use single quotes, since it's in a quoted
function body, you'll need to use two single quotes).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gaetano Mendola 2003-11-24 20:05:54 RPM RH9.0 conflict with unixODBC
Previous Message Brian Hirt 2003-11-24 19:29:49 fairly serious bug with pg_autovacuum in pg7.4