Adding unsigned 256 bit integers - Mailing list pgsql-hackers

From Olivier Lalonde
Subject Adding unsigned 256 bit integers
Date
Msg-id CALwxDuETY1_jzBSQC+nR-uBY0eZHhH5poTMo0KCCi14Z4RtCtQ@mail.gmail.com
Whole thread Raw
Responses Re: Adding unsigned 256 bit integers  (Andrew Dunstan <andrew@dunslane.net>)
Re: Adding unsigned 256 bit integers  (Craig Ringer <craig@2ndquadrant.com>)
Re: Adding unsigned 256 bit integers  ("ktm@rice.edu" <ktm@rice.edu>)
List 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

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Next
From: Tom Lane
Date:
Subject: Re: Get more from indices.