| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Neil Conway <nconway(at)klamath(dot)dyndns(dot)org> |
| Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: storing binary data |
| Date: | 2000-10-17 03:57:36 |
| Message-ID: | 29152.971755056@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Neil Conway <nconway(at)klamath(dot)dyndns(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2000-10-17 04:18:28 | Re: web programming |
| Previous Message | Alfred Perlstein | 2000-10-17 03:56:33 | Re: storing binary data |