Re: pl/pgsql - code review + question

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: pl/pgsql - code review + question
Дата
Msg-id 002301c10fa6$1f176820$1001a8c0@archonet.com
обсуждение исходный текст
Ответ на pl/pgsql - code review + question  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Ответы Re: pl/pgsql - code review + question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
From: "Gary Stainburn" <gary.stainburn@ringways.co.uk>

> My problem now is that when I include the code to handle the record not
being
> there, from the pgsql chapter (section 23.2.3.3) I get the following
errors

Hey - stop that! If everyone starts reading the docs and quoting chapter
refs all we'll be left with are *difficult* questions ;-)

> based of the function below.  Can anyone explain why the concat of the
string
> is failing. If I simply "raise exception ''member not found''" all works
fine.

Yep - this one keeps getting me too.

>       raise exception ''Member '' || unitno || '' not found'';

RAISE EXCEPTION ''Member % not found'', unitno;

Don't know why the parser for RAISE doesn't like string concat. Possibly
because it maps to the elog() error-reporting function underneath.

- Richard Huxton



В списке pgsql-sql по дате отправления:

Предыдущее
От: Jeff Eckermann
Дата:
Сообщение: RE: pl/pgsql - code review + question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pl/pgsql - code review + question