pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: curiosity in default column header
Date: Fri, 24 Feb 2023 13:47:44 -0700
Message-ID: <aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com>
Permalink:  ../aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com/
Also on:    postgresql.org/message-id/aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com
  Subject: Re: curiosity in default column header
  In-Reply-To: <aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com>
  References: <aadf90e9-4166-854e-ed56-76d92a77a705@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox