hex input values

Поиск
Список
Период
Сортировка
От elein
Тема hex input values
Дата
Msg-id MABBJCMLMNABIPABODDHAEFECFAA.elein@nextbus.com
обсуждение исходный текст
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: "imago"
Дата:
Сообщение: Re: DROP SEQUENCE ?
Следующее
От: Adam Haberlach
Дата:
Сообщение: Dangling large objects