Re: plperl vs. bytea - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: plperl vs. bytea
Date
Msg-id 463D3B38.40607@dunslane.net
Whole thread Raw
In response to Re: plperl vs. bytea  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: plperl vs. bytea
List pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> After discussing some possibilities, we decided that maybe 
>> the best approach would be to allow a custom GUC variable that would 
>> specify a list of types to be passed in binary form with no conversion, e.g.
>>     
>
>   
>>   plperl.pass_as_binary = 'bytea, other-type'
>>     
>
> At minimum this GUC would have to be superuser-only, and even then the
> security risks seem a bit high.  But the real problem with this thinking
> is the same one I already pointed out to Theo: why do you think this
> issue is plperl-specific?
>
>     
>   

It's not. If we really want to tackle this root and branch without 
upsetting legacy code, I think we'd need to have a way of marking data 
items as binary in the grammar, e.g.
 create function myfunc(myarg binary bytea) returns binary bytea 
language plperl as $$ ...$$;

That's what I originally suggested to Theo. It would be a lot more work, 
though :-)

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plperl vs. bytea
Next
From: Bruce Momjian
Date:
Subject: Managing the community information stream