On Monday 28 January 2008 05:37:03 Florian Weimer wrote:
> * Robert Treat:
> > Note we've been using Theo's plperl bytea patch on one of our
> > production servers for some time; if anyone wants access to that
> > lmk.
>
> I'm interested. Could you post a pointer to this code, please?
I had to do
* Robert Treat:
> Note we've been using Theo's plperl bytea patch on one of our
> production servers for some time; if anyone wants access to that
> lmk.
I'm interested. Could you post a pointer to this code, please?
--
Florian Weimer<[EMAIL PROTECTED]>
BFK edv-consulting GmbH
On Friday 25 January 2008 10:11, Andrew Dunstan wrote:
> Florian Weimer wrote:
> > This doesn't work because '\' is turned into '\\' by PostgreSQL, and
> > not '\134':
> >
> > my $arg = shift;
> > $arg =~ s!\\(\d{3})!chr(oct($1))!ge;
> >
> > Something like this might be better:
> >
> >
Florian Weimer wrote:
This doesn't work because '\' is turned into '\\' by PostgreSQL, and
not '\134':
my $arg = shift;
$arg =~ s!\\(\d{3})!chr(oct($1))!ge;
Something like this might be better:
my $arg = shift;
$arg =~ s!\\(?:\\|(\d{3}))!$1 ? chr(oct($1)) : "\\"!ge;
You need
This doesn't work because '\' is turned into '\\' by PostgreSQL, and
not '\134':
my $arg = shift;
$arg =~ s!\\(\d{3})!chr(oct($1))!ge;
Something like this might be better:
my $arg = shift;
$arg =~ s!\\(?:\\|(\d{3}))!$1 ? chr(oct($1)) : "\\"!ge;
You need to do this in one go beca