linebreaks in PL/pgSQL

From: Hans-Juergen Schoenig <hs(at)bachata(dot)cybertec(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: linebreaks in PL/pgSQL
Date: 2001-09-21 08:43:51
Message-ID: 3BAAFDC7.125CB05A@bachata.cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have written a small PL/pgSQL function. The error message is very long
and I wonder if there is a way to insert a linebreak into the code to
make it clearer: The code below makes a linebreak in the output as well:

...
BEGIN
IF (lower < 1) OR (higher < 1) THEN
RAISE EXCEPTION ''both param. have to be > 0'';
ELSE
IF (lower <= higher) THEN
lowtmp := lower - 1;
lowres := (lowtmp+1)*lowtmp/2;
highres := (higher+1)*higher/2;
result := highres-lowres;
ELSE
RAISE EXCEPTION ''The first value (%)
has to be higher
than the second value (%)'',
higher, lower;
END IF;
END IF;
RETURN result;
END;
...

Is there someting like that?
RAISE EXCEPTION ''The first value (%) has to be higher \
than the second value (%)'',
higher, lower;

(it doesn't lead to the desired result).

Hans

--
Cybertec Geschwinde &. Schoenig OEG
Ludo-Hartmannplatz 1/14; A-1160 Wien
Tel.: +43/1/913 68 09 oder +43/664/233 90 75
URL: www.cybertec.at oder http://postgres.cybertec.at

Browse pgsql-general by date

  From Date Subject
Next Message Tille, Andreas 2001-09-21 10:18:40 Hardware tuning (Was: Performance question)
Previous Message Lincoln Yeoh 2001-09-21 08:04:32 Does postgresql use /tmp?