Re: [SQL] plperlu user function.

2010-05-18 Thread silly sad
On 05/19/10 01:29, David Harel wrote: I am trying to write a user function on the server to retrive image files. Currently I wrote the following: my $tmpfile = shift; open my $IFHAND, '<', $tmpfile Any recommendation how to do it right? first of all, stop opening files at all, return to

Re: [SQL] plperlu user function.

2010-05-18 Thread Alex Hunsaker
On Tue, May 18, 2010 at 15:29, David Harel wrote: > Greetings, > > I am trying to write a user function on the server to retrive image files. > Currently I wrote the following: > CREATE OR REPLACE FUNCTION perl_getfile(text) >   RETURNS OID AS I think you meant returns bytea or text or something.

[SQL] plperlu user function.

2010-05-18 Thread David Harel
Greetings, I am trying to write a user function on the server to retrive image files. Currently I wrote the following: CREATE OR REPLACE FUNCTION perl_getfile(text) RETURNS OID AS $BODY$ my $tmpfile = shift; open my $IFHAND, '<', $tmpfile or elog(ERROR, qq{could not open the f