Thread: How can I read display message from a C function

How can I read display message from a C function

From
"Fay Du"
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi All:</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><span style="mso-spacerun:yes">    </span>I would like to put some message in my C function <span
class="GramE">(<span class="SpellE">myTestFunction</span></span>). Currently, I want to see time for each function call
inside<span class="SpellE">myTestFunction</span>. The output to the screen commands are in <span
class="SpellE">myTestFunction</span>.<span class="SpellE"><span class="GramE">myTestFunction</span></span> is called
from<span class="SpellE">postgresql</span>. How can I see the messages? Thanks in advance.</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Fay</span></font></div>

Re: How can I read display message from a C function

From
Markus Schaber
Date:
Hi, Fay,

Fay Du wrote:

>     I would like to put some message in my C function ( myTestFunction).
> Currently, I want to see time for each function call inside
> myTestFunction. The output to the screen commands are in myTestFunction.
> myTestFunction is called from postgresql. How can I see the messages?

Hmm, would statement logging help you?

If not, you could use elog(NOTICE, "message with time");

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org