Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu? - Mailing list pgsql-general

From Tom Lane
Subject Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?
Date
Msg-id 25348.1347461223@sss.pgh.pa.us
Whole thread Raw
In response to Is there a way to use "pack" in pl/perl without resorting to pl/perlu?  (Herouth Maoz <herouth@unicell.co.il>)
Responses Re: Is there a way to use "pack" in pl/perl without resorting to pl/perlu?  (Herouth Maoz <herouth@unicell.co.il>)
List pgsql-general
Herouth Maoz <herouth@unicell.co.il> writes:
> I created a function that does some heavy string manipulation, so I needed to use pl/perl rather than pl/pgsql.
> I'm not experienced in perl, but the function works well when used as an independent perl subroutine - it depends
onlyon its arguments. I use the Encode package (in postgresql configuration). 

> But my use of the "pack" function causes a Safe error. Apparently "pack" and "unpack" are in the operator mask.

> Is there any way to remove them from that mask?

My recollection is that they're intentionally excluded because they
would otherwise be security holes --- there are some format codes that
allow direct access to memory, or something like that.

            regards, tom lane


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: CentOS initd Script
Next
From: Scott Marlowe
Date:
Subject: Re: CentOS initd Script