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

From Bruce Momjian
Subject Re: RAISE concatination/variables in plpgsql
Date
Msg-id 200105080008.f4808Q813238@candle.pha.pa.us
Whole thread Raw
In response to Re: RAISE concatination/variables in plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: RAISE concatination/variables in plpgsql
List pgsql-bugs
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> >> Looking at the plpgsql code, it's clear that what's actually implemented
> >> is
> >> RAISE level string-literal [ , variable [ , variable [ ... ] ]
>
> > I see the current docs showing:
>
> >     RAISE level 'format' [, identifier [...]];
>
> > Is this acceptable?  Should 'identifier' be 'variable'?
>
> Probably.  And 'format' is even more misleading, since it implies that
> you write a printf-like format string, which you do not.  The output is
> just the concatenation of the literal and the variable values.

Updated with patch attached.

>
> >> which is pretty bletcherous; seems like it should accept a list of
> >> expressions instead.  But for 7.1, I guess this is a documentation bug
> >> rather than something to change in the code.
>
> > Do I need a TODO item here?
>
> It seems in need of fixing to me ...

TODO updated with:

    * Allow Pl/PgSQL's RAISE function to take expressions

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: doc/src/sgml/plsql.sgml
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/doc/src/sgml/plsql.sgml,v
retrieving revision 2.25
diff -c -r2.25 plsql.sgml
*** doc/src/sgml/plsql.sgml    2001/03/23 22:07:50    2.25
--- doc/src/sgml/plsql.sgml    2001/05/08 00:05:24
***************
*** 1306,1312 ****
      <productname>Postgres</productname> elog mechanism.

  <synopsis>
! RAISE <replaceable class="parameter">level</replaceable> '<replaceable class="parameter">format</replaceable>'
<optional>,<replaceable class="parameter">identifier</replaceable> <optional>...</optional></optional>; 
  </synopsis>

      Inside the format, <literal>%</literal> is used as a placeholder for the
--- 1306,1312 ----
      <productname>Postgres</productname> elog mechanism.

  <synopsis>
! RAISE <replaceable class="parameter">level</replaceable> '<replaceable class="parameter">string</replaceable>'
<optional>,<replaceable class="parameter">variable</replaceable> <optional>...</optional></optional>; 
  </synopsis>

      Inside the format, <literal>%</literal> is used as a placeholder for the

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: RAISE concatination/variables in plpgsql
Next
From: Tom Lane
Date:
Subject: Re: backend dies on 7.1.1 loading large datamodel.