[Pljava-dev] Issue 21 Re: PL/java kills unicode chars?

From: chap at anastigmatix(dot)net (Chapman Flack)
To:
Subject: [Pljava-dev] Issue 21 Re: PL/java kills unicode chars?
Date: 2015-09-23 23:39:49
Message-ID: 56033845.9090007@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Question (mostly for Thomas),

In working on issue 21, would it be acceptable to add specialized
calls (in JNICalls or elsewhere), for calling up into a very select
few Java methods without releasing and reacquiring the threadlock?

such as...

CharSequence.toString()
java.nio.Buffer.position()
java.nio.CharBuffer.wrap(CharSequence)
java.nio.charset.CharsetDecoder.decode(ByteBuffer)
java.nio.charset.CharsetEncoder.encode(CharBuffer,ByteBuffer,boolean)

They could be called rather often ;) and the monitor operations could be
overkill; no point giving another thread access to the backend during
such a simple operation.

I like your comments in the source saying "Would be nice if a direct
conversion from UTF16 was provided." This task is like some kind of
"you can't get there from here" Vaudeville routine. Between what's
provided in PG and what's in Java there are at least three different APIs
to approach the problem with, and for *each one* there seems to be *one*
feature lacking that necessitates going the long way around, too many
pallocs/copies. etc.

Or Kafka. It could be Kafka.

-Chap

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2015-09-24 06:21:04 [Pljava-dev] Issue 21 Re: PL/java kills unicode chars?
Previous Message Thomas Hallgren 2015-09-21 06:40:39 [Pljava-dev] allowing *inheritance* from pgjdbc or pgjdbc-ng ?