From: | hamann(dot)w(at)t-online(dot)de |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [SOLVED] running script on the server |
Date: | 2015-07-29 05:17:44 |
Message-ID: | wolfgang-1150729071743.A0426303@amadeus4.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Adrian Klaver wrote:
>> On 07/28/2015 08:28 PM, hamann(dot)w(at)t-online(dot)de wrote:
>> >
>> > Hi,
>> >
>> > can any of the programming languages (perl, tcl) be used to exec a process on the server
>> > and open files?
>>
>> You are looking for untrusted.
>>
>> For Python that is the only way it comes, hence plpythonu(ntrusted)
>>
>> For Perl see here:
>>
>> http://www.postgresql.org/docs/9.4/interactive/plperl-trusted.html
>>
>> That is all I know about.
>>
>> > The scenario I have in mind would
>> > - copy some fields of a table to an external text file
>> > - have a script generate binary data from the text file
>>
>> So what exactly does the above step entail?
>>
>> Just wondering if it could be done without leaving the database?
Hi Adrian,
the "untrusted" part seems to be the solution.
The script consists of a perl part - text preprocessing likely to be changed -
as well as a C program that actually builds the blob.
I have a little experience with building postgresql binary modules,
but I would prefer to keep the - tested - program separate.
Copying data from the table and text preprocessing could run in plperl
>>
>> > - load that data into a large object
>> > The client would just
>> > select rebuild()
Best regards
Wolfgang Hamann
--
gpg key: 92FCFB25
From | Date | Subject | |
---|---|---|---|
Next Message | Torsten Förtsch | 2015-07-29 05:46:59 | Question about timelines |
Previous Message | John McKown | 2015-07-29 04:21:07 | Re: running script on the server |