curiosity in default column header

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: curiosity in default column header
Date: 2023-02-24 20:47:44
Message-ID: aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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"?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-02-24 21:11:22 Re: curiosity in default column header
Previous Message Adrian Klaver 2023-02-24 16:59:01 Re: Debugging postgres on Windows - could not open directory "/lib"