Re: plperl vs. bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Theo Schlossnagle <jesus(at)omniti(dot)com>
Subject: Re: plperl vs. bytea
Date: 2007-05-07 00:48:28
Message-ID: 18422.1178498908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Peter Eisentraut wrote:
>> This ought to be a property of data type plus language, not a property
>> of a function.

> Why should it?

> And how would you do it in such a way that it didn't break legacy code?

> My GUC proposal would have made it language+type specific, but Tom
> didn't like that approach.

It may indeed need to be language+type specific; what I was objecting to
was the proposal of an ad-hoc plperl-specific solution without any
consideration for other languages (or other data types for that matter).
I think that's working at the wrong level of detail, at least for
initial design.

What we've basically got here is a complaint that the default
textual-representation-based method for transmitting PL function
parameters and results is awkward and inefficient for bytea.
So the first question is whether this is really localized to only
bytea, and if not which other types have got similar issues.
(Even if you make the case that no other scalar types need help,
what of bytea[] and composite types containing bytea or bytea[]?)

After that we have to look at which PLs have the issue. I think
this is largely driven by what the PL's internal type system is
like, in particular does it have a datatype that is a natural
conversion target for bytea, or other types with the same issue?
(Tcl for instance once did not have 8-bit-clean strings, though
I think it does today.)

After we've got a handle on the scope of the problem we can start
to think about solutions.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-05-07 01:07:13 Re: temporal variants of generate_series()
Previous Message Hiroshi Inoue 2007-05-06 21:38:45 Re: psqlodbc - psqlodbc: Put Autotools-generated files into subdirectory