Re: Re: Unable to store SHA hash (Non-HTML--Sorry)

From: "David Wall" <d(dot)wall(at)computer(dot)org>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Re: Unable to store SHA hash (Non-HTML--Sorry)
Date: 2001-05-04 00:24:52
Message-ID: 013501c0d430$a327ff00$5a2b7ad8@expertrade.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

> In my code where I need to store short pieces of binary data (like
> digests) I encode them in hex and store the hex. Yes this results in a
> 2 times increase in storage, and some overhead in encoding/decodeing,
> but it isn't too bad. Sure you could use other encodings for the binary
> data, but I find hex to be the easiest for small amounts of data.

We use base64 which converts every 3 characters into 4 (as I recall) for
such short things. For longer, type oid in sql works with
setBytes()/getBytes() in JDBC2, but what the overhead is for a small amount
of binary data I don't know.

David

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Evelio Martinez 2001-05-04 08:13:29 rpm jdbc installation
Previous Message Barry Lind 2001-05-04 00:11:15 Re: Unable to store SHA hash (Non-HTML--Sorry)