Re: storing binary data
От | Tom Lane |
---|---|
Тема | Re: storing binary data |
Дата | |
Msg-id | 29152.971755056@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: storing binary data (Neil Conway <nconway@klamath.dyndns.org>) |
Ответы |
Re: storing binary data
|
Список | pgsql-general |
Neil Conway <nconway@klamath.dyndns.org> writes: >> You could use bytea, but I would recommend converting the checksum >> to a hex digit string and then storing that in a char-type field. >> Hex is the usual textual representation for MD5 values, no? > It is, but (IMHO) it's a big waste of space. The actual MD5 digest is > 128 bits. If stored in binary form, it's 16 bytes. If stored in hex > form (as ASCII), it's 32 characters @ 1 byte per character =3D 32 bytes. You're worried about 16 bytes per pg_shadow entry? Get real. I'd have recommended bytea if the amount of storage involved were actually significant, but for this application readability seems more important. regards, tom lane
В списке pgsql-general по дате отправления: