function attributes

From: Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: function attributes
Date: 2010-12-11 22:27:43
Message-ID: 4D03FADF.4000205@pgexperts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-12-11 23:19:12 Re: proposal: auxiliary functions for record type
Previous Message Jim Nasby 2010-12-11 21:52:57 Re: proposal: auxiliary functions for record type