Обсуждение: Error in manual

Поиск
Список
Период
Сортировка

Error in manual

От
Travis Bauer
Дата:
Thanks for the help on the libperl question.  I bet recompiling the
sources will fix my problem.

There is an error in the example in the file: triggers20290.htm.  All the
elog statements list "WARN" as the first parameter.  However WARN is not
defined in elog.h (or, it seems, anywhere else).  In my code, I just used
NOTICE instead and it worked okay.

On another note, I noticed that when you load a dynamically loaded c
library using the create funtion statement in psql, the library is never
reloaded unless you quit psql and restart it, even if you "drop function",
change the library, and recreate the function.  This is good for making
the code work fast (you don't want postgress to keep checking to see if
the library has changed), but this should probably be noted somewhere in
the programmers manual.  If you don't know this, debugging a c function
can be quite frustrating.

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------


Re: Error in manual

От
Bruce Momjian
Дата:
> Thanks for the help on the libperl question.  I bet recompiling the
> sources will fix my problem.
>
> There is an error in the example in the file: triggers20290.htm.  All the
> elog statements list "WARN" as the first parameter.  However WARN is not
> defined in elog.h (or, it seems, anywhere else).  In my code, I just used
> NOTICE instead and it worked okay.

I am fixing the documentation now.


--
  Bruce Momjian                        |  http://www.op.net/~candle
  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

Re: Error in manual

От
Tom Lane
Дата:
Travis Bauer <trbauer@indiana.edu> writes:
> On another note, I noticed that when you load a dynamically loaded c
> library using the create funtion statement in psql, the library is never
> reloaded unless you quit psql and restart it, even if you "drop function",
> change the library, and recreate the function.

I believe there is a "LOAD" command that will reload the library without
needing to restart the backend.  Not sure if that's any easier than
just restarting though...

> but this should probably be noted somewhere in
> the programmers manual.

Agreed.

            regards, tom lane