By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Bitwise operators for bytea

P: n/a
Is there any particular reason there are no bitwise operators (I'm
looking for XOR, specifically) for the bytea data type? Any plans to
add them?

What I'm trying to do is store an SHA-1 hash in the database, and
create a trigger that runs on insert or update and updates a 'running
hash' record in another table by xoring it with the new (and in the
case of an update, old) hash. The best candidates are bytea, but that
has no xor operation, or bit(n), but there's no way to convert back to
hexadecimal from it.

Also, is there any particular reason sha1() is still not in PGSQL? I
know it's in pgcrypto, but shouldn't it be in main? MD5 is, and that's
now deprecated.

Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.