From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: function attributes |
Date: | 2010-12-12 02:16:54 |
Message-ID: | AANLkTinXVSQxEggCydtymWR1EJMaEvuGXCQRybw0KT--@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Dec 11, 2010 at 5:27 PM, Andrew Dunstan
<andrew(dot)dunstan(at)pgexperts(dot)com> wrote:
> Yesterday I did a bit of work on allowing bytea values to be passed into and
> out of plperl in binary format, effectively removing the need to escape and
> de-escape them. (The work can be seen on he plperlargs branch of my
> development repo at
> <https://github.com/adunstan/postgresql-dev/commits/plperlargs/>).
>
> At the moment the behaviour is triggered by a custom setting
> (plperl.pass_binary_bytea), but this isn't really satisfactory. We could
> turn it on permanently, but that would break a lot of legacy code. What we
> really need is a way of marking a function with some attributes. Of course,
> we could put it in the program text like plpgsql's #variable_conflict, but
> that's really rather ugly. The grammar already has an attribute mechanism
> for functions, and ISTM we just need to extend that a bit to allow setting
> of function attributes reasonably flexibly, much as we can now specify
> format options on EXPLAIN or we'll soon be able to specify options for
> foreign tables.
>
> Thoughts?
Well, you could set that GUC (plperl.pass_binary_bytea) on a function
without changing any syntax on at all.
CREATE FUNCTION name (args) ... SET plperl.pass_binary_bytea = true;
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2010-12-12 02:21:26 | Re: unlogged tables |
Previous Message | Robert Haas | 2010-12-12 02:12:09 | Re: unlogged tables |