RAISE concatination/variables in plpgsql - Mailing list pgsql-bugs

From Henshall, Stuart - WCP
Subject RAISE concatination/variables in plpgsql
Date
Msg-id E2870D8CE1CCD311BAF50008C71EDE8E01CA7F0B@MAIL_EXCHANGE
Whole thread Raw
Responses Re: RAISE concatination/variables in plpgsql
List pgsql-bugs
SEVERITY:Minor Anoyance
In the plpgsql docs it has the following example:
RAISE NOTICE ''Id number '' || key || '' not found!'';
When I put a function round this statement it gives a compile error at the
|.
Also when fiddling if I put a variable first it complains about that
variable (eg key || '' val.....'')
Here is the script I  ran:
DROP FUNCTION tstktxt(text);
CREATE FUNCTION tstktxt(text) RETURNS text AS '
DECLARE
    key ALIAS FOR $1;
BEGIN
    RAISE NOTICE ''Id number '' || key || '' not found!'';
    RETURN key;
END;
' LANGUAGE 'plpgsql';

DROP FUNCTION tstkint(int4);
CREATE FUNCTION tstkint(int4) RETURNS int4 AS '
DECLARE
    key ALIAS FOR $1;
BEGIN
    RAISE NOTICE ''Id number '' || key || '' not found!'';
    RETURN key;
END;
' LANGUAGE 'plpgsql';

SELECT tstktxt('Test');
SELECT tstkint(42);

This gave the following result:

DROP
CREATE
DROP
CREATE
psql:core/kytst.sql:21: NOTICE:  plpgsql: ERROR during compile of tstktxt
near line 4
psql:core/kytst.sql:21: ERROR:  parse error at or near "|"
psql:core/kytst.sql:22: NOTICE:  plpgsql: ERROR during compile of tstkint
near line 4
psql:core/kytst.sql:22: ERROR:  parse error at or near "|"

Is this a bug or documentation error?
I'm running on cygwin 1.1.7, cygipc 1.9.2, on win98SE
Here's the postmaster output (with -d2):
 <<z>>

Attachment

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: BUG??, fault in POSTMASTER when using GMAKE
Next
From: Lamar Owen
Date:
Subject: Re: startup scripts don't function properly