一种简单的方法是:
select ('x'||lpad(the_hex_value,16,'0'))::bit(64)::bigint;必须使用0填充左侧,因为始终将最左侧的位解释为符号位。另外请记住,带
bigint签名的postgres没有内置的无符号类型。

一种简单的方法是:
select ('x'||lpad(the_hex_value,16,'0'))::bit(64)::bigint;必须使用0填充左侧,因为始终将最左侧的位解释为符号位。另外请记住,带
bigint签名的postgres没有内置的无符号类型。