riftehr=> select ascii(substring('sadb', 2,1));
 ascii
-------
    97
(1 row)

riftehr=> select 24::bit(8);
   bit
----------
 00011000
(1 row)

riftehr=> select ascii(substring('sadb', 2,1))::bit(8);
  ascii
----------
 01100001
(1 row)

Why is the last one headed "ascii" and not "bit"?

Reply via email to