Re: [HACKERS] Adding unsigned 256 bit integers

2014-04-14 Thread Olivier Lalonde
Thanks for helping me out everyone. I ended up simply using the numeric type (I didn't realize it could support such large numbers) and writing the hex-to-numeric conversion functions in my application code. On 11 April 2014 12:27, Leon Smith leon.p.sm...@gmail.com wrote: pgmp is also worth

[HACKERS] Adding unsigned 256 bit integers

2014-04-10 Thread Olivier Lalonde
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

Re: [HACKERS] Adding unsigned 256 bit integers

2014-04-10 Thread Andrew Dunstan
On 04/10/2014 09:13 AM, Olivier Lalonde wrote: 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

Re: [HACKERS] Adding unsigned 256 bit integers

2014-04-10 Thread Craig Ringer
On 04/10/2014 09:13 PM, Olivier Lalonde wrote: I was wondering if there would be any way to do the following in PostgreSQL: UPDATE cryptotable SET work = work + 'some big hexadecimal number' For readers finding this in the archives, this question also appears here:

Re: [HACKERS] Adding unsigned 256 bit integers

2014-04-10 Thread k...@rice.edu
On Thu, Apr 10, 2014 at 09:13:47PM +0800, Olivier Lalonde wrote: 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

Re: [HACKERS] Adding unsigned 256 bit integers

2014-04-10 Thread Leon Smith
pgmp is also worth mentioning here, and it's likely to be more efficient than the numeric type or something you hack up yourself: http://pgmp.projects.pgfoundry.org/ Best, Leon On Thu, Apr 10, 2014 at 10:11 AM, k...@rice.edu k...@rice.edu wrote: On Thu, Apr 10, 2014 at 09:13:47PM +0800,