Re: pl/pgsql - code review + question - Mailing list pgsql-sql

From Richard Huxton
Subject Re: pl/pgsql - code review + question
Date
Msg-id 002301c10fa6$1f176820$1001a8c0@archonet.com
Whole thread Raw
In response to pl/pgsql - code review + question  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Responses Re: pl/pgsql - code review + question  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Jeff Eckermann
Date:
Subject: RE: pl/pgsql - code review + question
Next
From: Tom Lane
Date:
Subject: Re: pl/pgsql - code review + question