[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#787570: debsources: DB: change sha256 column data type from string to bytea or bit string



Re: Stefano Zacchiroli 2015-06-02 <[🔎] 20150602214710.10925.72165.reportbug@timira.takhisis.invalid>
> We should switch to a more economic (and efficient) data type for storing
> sha256 checksums. Good options seem to be either bytea [1] or fixed-size bit
> strings [2]. Suggestions welcome!

Definitely bytea.

I've never really seen bit used in practise. It's mostly present
because it's an SQL standard type. For input/output, everything gets
converted to a lengthy series of 0/1s, while bytea's default "hex"
transfer encoding is especially easy to parse back to the hex format
you'd want anyway. (Don't worry about the fact that there's no length
modifier for bytea, it won't change the behaviour in practise.)

Christoph
-- 
cb@df7cb.de | http://www.df7cb.de/


Reply to: