Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9AB24643F6F for ; Wed, 19 May 2010 02:38:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 54821-05 for ; Wed, 19 May 2010 05:38:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 0C79864385F for ; Wed, 19 May 2010 02:38:04 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OEbyj-0006Lq-Em for pgsql-sql@postgresql.org; Wed, 19 May 2010 09:38:01 +0400 Received: from [192.168.1.6] [178.34.185.120] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 1463BF; Wed, 19 May 2010 09:38:01 +0400 Message-ID: <4BF37938.9050403@bankir.ru> Date: Wed, 19 May 2010 09:38:00 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: plperlu user function. References: <4BF306C4.8050101@gmail.com> In-Reply-To: <4BF306C4.8050101@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201005/85 X-Sequence-Number: 34133 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 a client a pathname, then give to Caesar what is Caesar's, and to God what is God's.