Thanks for the input.  As I've said, I'm not sure which way I want to go.  They 
are separate data points after all, so the array would be more "normal" than a 
blob.  I would likely need to use bytea, since any data point may be null.

I'm still casting around, so please chime in if some brilliant solution pops up 
:)

rjs


Sent from my iPad

> On Apr 1, 2014, at 12:14 AM, Lukas Eder <[email protected]> wrote:
> 
> Hi Rob,
> 
> That's an interesting use-case that we hadn't thought of, so far. What's the 
> optimal way to handle this kind of data in PostgreSQL itself? Is such a large 
> a char array really a good idea, compared to a text/blob type? This could be 
> verified over at Stack Overflow. Would be interesting to hear a PostgreSQL 
> expert's opinion.
> 
> In any case, most SQL dialects do not really have a single-character char 
> type like Java. CHAR is really a fixed-length string, which is why jOOQ also 
> uses the String type. One way to introduce your own custom data types is to 
> use Converters in jOOQ and attach them to generated code through the relevant 
> code generator configuration:
> http://www.jooq.org/doc/latest/manual/code-generation/custom-data-types
> 
> With Converters, I think you'll need to resort to a more standard database 
> type, i.e. text/blob instead of char[], to prevent rather memory-intensive 
> instantiations of String[]
> 
> Hope this helps,
> Lukas
> 
> 
> 2014-03-31 23:40 GMT+02:00 Rob Sargent <[email protected]>:
>> I'm dealing with a large number of tiny data points for a given sample
>> 
>> I may use a text (blob) field anyway, but I would like to test using and 
>> array of single byte.  Since I'm using postgres this is "char"[100000].  The 
>> code generator gives me the field as String[].  What I would rather get is a 
>> CharBuffer.  I would rather not go through the String just to get the char 
>> (cb.charAt(address) rather the sa[address].charAt(0)).  And similarly with 
>> slices of the CharBuffer's array.
>> 
>> I'm using postgres 9.3 amd jooq-3.3.1 on RHEL.
>> 
>> Pointers and such greatly appreciated,
>> 
>> rjs
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to