Re: RAISE concatination/variables in plpgsql
От | Bruce Momjian |
---|---|
Тема | Re: RAISE concatination/variables in plpgsql |
Дата | |
Msg-id | 200105080028.f480Swi15885@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: RAISE concatination/variables in plpgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-bugs |
OK, SGML updated. > I wrote: > >> 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. > > Ugh. Should've read the code before pontificating ;-). The code makes > clear what is quite unclear in the docs: > /* > * Occurences of a single % are replaced by the next arguments > * external representation. Double %'s are left as is so elog() > * will also don't touch them. > */ > So "format" is appropriate, but the next sentence could use some > improvement. > > regards, tom lane > -- 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.26 diff -c -r2.26 plsql.sgml *** doc/src/sgml/plsql.sgml 2001/05/08 00:09:22 2.26 --- doc/src/sgml/plsql.sgml 2001/05/08 00:25:57 *************** *** 1306,1319 **** <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 ! subsequent comma-separated identifiers. Possible levels are ! DEBUG (silently suppressed in production running databases), NOTICE ! (written into the database log and forwarded to the client application) ! and EXCEPTION (written into the database log and aborting the transaction). </para> <para> --- 1306,1320 ---- <productname>Postgres</productname> elog mechanism. <synopsis> ! RAISE <replaceable class="parameter">level</replaceable> '<replaceable class="parameter">format</replaceable>' <optional>,<replaceable class="parameter">variable</replaceable> <optional>...</optional></optional>; </synopsis> ! Inside the format, <literal>%</literal> is replaced by the next argument's ! external representation. Double %'s are left unchanged for internal ! reasons. Possible levels are DEBUG (silently suppressed in production ! running databases), NOTICE (written into the database log and forwarded to ! the client application) and EXCEPTION (written into the database log and ! aborting the transaction). </para> <para>
В списке pgsql-bugs по дате отправления: