I cannot seem to insert hex values into an int column.
I must be doing something really stupid wrong, but I
can't see it.
insert into mytable (intcolumn) values (0xaabbcc);
parser error at "xaabbcc"
insert into mytable (intcolumn) values ('0xaabbcc');
pg_atoi...can't part "xaabbcc"
insert into mytable (intcolumn) values ('\0xaabbcc');
Inserts 0 (i.e. error/null value)
insert into mytable (intcolumn) values ('\\0xaabbcc');
pg_atoi...can't parse "\oaabbcc"
The pg_atoi() code calls strtol() which is documented
to handle hex values.
The error checking for EOS in pg_atoi() seems to be having
trouble with the leading zero.
Should I be storing these value as some other type?
thanks,
elein@nextbus.com