Re: curiosity in default column header

2023-02-24 Thread David G. Johnston
On Fri, Feb 24, 2023 at 1:47 PM Rob Sargent wrote: > > Why is the last one headed "ascii" and not "bit"? > Because a function name is more likely to be a useful label than a data type. David J.

curiosity in default column header

2023-02-24 Thread Rob Sargent
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 --  0111 (1 row) Why is the last one headed "ascii" and not "bit"?