dbTalk Databases Forums  

Bitwise operators for bytea

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Bitwise operators for bytea in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nick Johnson
 
Posts: n/a

Default Bitwise operators for bytea - 03-22-2005 , 09:52 PM






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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.