highgo=# select version();
version
------------------------------------
HighGo Database 3.1.4 Linux 64-bit
(1 row)
十进制转二进制示例:
highgo=# select 85::bit(8);
bit
----------
01010101
(1 row)
十六进制转二进制示例:
highgo=# select 'xff'::bit(8);
bit
----------
11111111
(1 row)
十六进制转十进制示例:
highgo=# select 'xff'::bit(8)::int;
int4
------
255
(1 row)
十进制转十六进制示例:
highgo=# select to_hex(255);
to_hex
--------
ff
(1 row)