Search Postgresql Archives

Is there a way to use "pack" in pl/perl without resorting to pl/perlu?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 only on 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? I don't want to use pl/perlu - it's too unsafe, I think, and its running environment is different. I just want these two operators.

This is what I'm using "pack" for: I convert a string in the format '43414C4C5F494445' into a binary string, and then, given a matching text encoding, use "decode" to convert it to proper unicode.


TIA,
Herouth

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux