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

Поиск
Список
Период
Сортировка
От David Wall
Тема Re: Re: Unable to store SHA hash (Non-HTML--Sorry)
Дата
Msg-id 013501c0d430$a327ff00$5a2b7ad8@expertrade.com
обсуждение исходный текст
Ответ на Unable to store SHA hash (Non-HTML--Sorry)  ("Jerry Reid" <jereid@hotmail.com>)
Список 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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Unable to store SHA hash (Non-HTML--Sorry)
Следующее
От: "Subhramanya Shiva"
Дата:
Сообщение: How to encode and decode a string as a password field in pgsql table?