pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBugReport: PostgreSQL 17.8. Processing UTF8 encoded strings
2+ messages / 2 participants
[nested] [flat]
* BugReport: PostgreSQL 17.8. Processing UTF8 encoded strings
@ 2026-02-25 06:50 Vladimir Valikaev <vladimir@4vrs.com>
2026-02-25 13:59 ` Re: BugReport: PostgreSQL 17.8. Processing UTF8 encoded strings David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Valikaev @ 2026-02-25 06:50 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: Victor Sudakov <vas@4vrs.com>; Eugene Nasonkin <niksa@4vrs.com>
Greetings,
After updating PostgreSQL from version 17.7 to 17.8, we encountered a
problem when extracting a substring from a UTF8 encoded string:
*ERROR: invalid byte sequence for encoding "UTF8": 0xe2*
*
*
_Server:_
Linux i-db-sandbox1.4vrs.com 6.1.0-43-cloud-amd64 #1 SMP PREEMPT_DYNAMIC
Debian 6.1.162-1 (2026-02-08) x86_64 GNU/Linux
$ cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main
deb-src http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main
deb https://apt-archive.postgresql.org/pub/repos/apt
bookworm-pgdg-archive main
PostgreSQL 17.8 (Debian 17.8-1.pgdg12+1) on x86_64-pc-linux-gnu,
compiled by gcc (Debian 12.2.0-14+deb12u1) 12.2.0, 64-bit
_Steps to reproduce (psql):_
db_fev:vladimir@i-db-sandbox1 => create table test123(id integer, m text);
CREATE TABLE
db_fev:vladimir@i-db-sandbox1 => insert into test123 (id,m) values (1,
repeat('a', 1027)||E'\xe2\x80\x8d'||repeat('a', 1027));
INSERT 0 1
db_fev:vladimir@i-db-sandbox1 => select length(SUBSTRING(m from 1 for
256)) from test123;
*ERROR: invalid byte sequence for encoding "UTF8": 0xe2*
db_fev:vladimir@i-db-sandbox1 => select length(SUBSTRING(substring(m
from 1 for length(m)) from 1 for 256)) from test123;
length
--------
256
(1 row)
_Database db_feb:_
Name | Encoding | Locale Provider | LC_COLLATE | LC_CTYPE |
Locale | ICU Rules |
------------+-----------+-----------------+------------+----------+--------+-----------+
db_feb | UTF8 | libc | C | C | [NULL] |
[NULL] |
The problem does not appear on PostgreSQL 17.7. Also, the problem does
not occur if the string is fully loaded into memory:
db_feb:vladimir@i-db-sandbox1 =# select length(SUBSTRING(*substring(m
from 1 for length(m))* from 1 for 256)) from test123;
length
--------
256
(1 row)
The bugreport has also been sent to bugs@postgrespro.ru
--
Best Regards,
Vladimir Valikaev
Streamline - Property Management Software
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BugReport: PostgreSQL 17.8. Processing UTF8 encoded strings
2026-02-25 06:50 BugReport: PostgreSQL 17.8. Processing UTF8 encoded strings Vladimir Valikaev <vladimir@4vrs.com>
@ 2026-02-25 13:59 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2026-02-25 13:59 UTC (permalink / raw)
To: Vladimir Valikaev <vladimir@4vrs.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>; Victor Sudakov <vas@4vrs.com>; Eugene Nasonkin <niksa@4vrs.com>
On Tuesday, February 24, 2026, Vladimir Valikaev <vladimir@4vrs.com> wrote:
>
> After updating PostgreSQL from version 17.7 to 17.8, we encountered a
> problem when extracting a substring from a UTF8 encoded string:
> *ERROR: invalid byte sequence for encoding "UTF8": 0xe2*
>
> This should be fixed in tomorrows out-of-cycle release.
https://www.postgresql.org/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-02-25 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 06:50 BugReport: PostgreSQL 17.8. Processing UTF8 encoded strings Vladimir Valikaev <vladimir@4vrs.com>
2026-02-25 13:59 ` 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