BUG #17258: Unexpected results in CHAR(1) data type

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17258: Unexpected results in CHAR(1) data type
Дата
Msg-id 17258-a7c164c5fb955221@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17258: Unexpected results in CHAR(1) data type  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #17258: Unexpected results in CHAR(1) data type  (Mark Dilger <mark.dilger@enterprisedb.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17258
Logged by:          David Calascibetta
Email address:      david@calascibetta.com
PostgreSQL version: 12.8
Operating system:   AWS RDS
Description:

My understanding is that a CHAR(1) column can never be 0 (zero) length.
I expect the results of these two SELECT statements to produce the same
result:

select length(substr('   '::varchar,1,1)), ascii(substr('
'::varchar,1,1));
produces==> 1    32   (as expected)

select length(substr('   '::char,1,1)), ascii(substr('   '::char,1,1));
produces==> 0     0     (not as expected)


В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17256: Running pgagent on a custom user
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #17257: (auto)vacuum hangs within lazy_scan_prune()