RAISE concatination/variables in plpgsql

Поиск
Список
Период
Сортировка
Искать
От
Henshall, Stuart - WCP
Тема
RAISE concatination/variables in plpgsql
Дата
Msg-id
E2870D8CE1CCD311BAF50008C71EDE8E01CA7F0B@MAIL_EXCHANGE
Список
Дерево обсуждения
RAISE concatination/variables in plpgsql "Henshall, Stuart - WCP" <SHenshall@westcountrypublications.co.uk>
Re: RAISE concatination/variables in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: RAISE concatination/variables in plpgsql Bruce Momjian <pgman@candle.pha.pa.us>
Re: RAISE concatination/variables in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: RAISE concatination/variables in plpgsql Bruce Momjian <pgman@candle.pha.pa.us>
Re: RAISE concatination/variables in plpgsql Tom Lane <tgl@sss.pgh.pa.us>
Re: RAISE concatination/variables in plpgsql Bruce Momjian <pgman@candle.pha.pa.us>
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):
 <> 
В списке pgsql-bugs по дате отправления
От: Peter Eisentraut
Дата:
От: Lamar Owen
Дата:
FAQ