pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedcuriosity in default column header
2+ messages / 2 participants
[nested] [flat]
* curiosity in default column header
@ 2023-02-24 20:47 Rob Sargent <robjsargent@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Rob Sargent @ 2023-02-24 20:47 UTC (permalink / raw)
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
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"?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: curiosity in default column header
@ 2023-02-24 21:11 David G. Johnston <david.g.johnston@gmail.com>
parent: Rob Sargent <robjsargent@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2023-02-24 21:11 UTC (permalink / raw)
To: Rob Sargent <robjsargent@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
On Fri, Feb 24, 2023 at 1:47 PM Rob Sargent <robjsargent@gmail.com> 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-02-24 21:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-24 20:47 curiosity in default column header Rob Sargent <robjsargent@gmail.com>
2023-02-24 21:11 ` David G. Johnston <david.g.johnston@gmail.com>
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