Adding unsigned 256 bit integers

From: Olivier Lalonde <olalonde(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Adding unsigned 256 bit integers
Date: 2014-04-10 13:13:47
Message-ID: CALwxDuETY1_jzBSQC+nR-uBY0eZHhH5poTMo0KCCi14Z4RtCtQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was wondering if there would be any way to do the following in PostgreSQL:

UPDATE cryptotable SET work = work + 'some big hexadecimal number'

where work is an unsigned 256 bit integer. Right now my column is a
character varying(64) column (hexadecimal representation of the number) but
I would be happy to switch to another data type if it lets me do the
operation above.

If it's not possible with vanilla PostgreSQL, are there extensions that
could help me?

--
- Oli

Olivier Lalonde
http://www.syskall.com <-- connect with me!

Freelance web and Node.js engineer
Skype: o-lalonde

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-10 13:25:31 Re: Get more from indices.
Previous Message Bruce Momjian 2014-04-10 11:51:43 Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0