Re: what's wrong with my plperl function? - Mailing list pgsql-sql

From Tom Lane
Subject Re: what's wrong with my plperl function?
Date
Msg-id 6964.976118098@sss.pgh.pa.us
Whole thread Raw
In response to what's wrong with my plperl function?  (Bruno Boettcher <bboett@erm1.u-strasbg.fr>)
Responses Re: what's wrong with my plperl function?  (Bruno Boettcher <bboett@erm1.u-strasbg.fr>)
List pgsql-sql
Bruno Boettcher <bboett@erm1.u-strasbg.fr> writes:
> so what am i doing wrong?

I'm confused too...

> besides how can i output debug stuff from the
> perl script? print manifestingly doesn't work...

I don't see why print wouldn't work.  Realize however that it will
go to the postmaster's stdout, so you'd better not have started the
postmaster with -S, and you should have redirected the postmaster's
stdout/stderr into a log file someplace.

You might have better luck printing to stderr, BTW ... that should
get flushed to the disk file once per line, whereas Perl might think
it only needs to flush stdout once per block.

Also, it looks like plperl supports elog(NOTICE, "text") and
elog(ERROR, "text"), though I haven't tried 'em.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Shane McEneaney"
Date:
Subject: CallableStatement
Next
From: Bruno Boettcher
Date:
Subject: Re: what's wrong with my plperl function?