Код: Выделить всё
demo=> select * from pg_stat_activity where pid=1797957 \gx
ERROR: character with byte sequence 0xd0 0xb4 in encoding "UTF8" has no equivalent in encoding "WIN1252"
Несоответствие кодировки вывода (UTF8) клиентской кодировке (WIN1251) можно устранить, выполнив в psql:
Код: Выделить всё
SET client_encoding TO 'WIN1251';Код: Выделить всё
SET PGOPTIONS=--client_encoding=WIN1251Код: Выделить всё
demo=> select * from pg_stat_activity where pid=1797957 \gx
-[ RECORD 1 ]----+--------------------------------------------------------------------------------------------------------------------
datid | 12345
datname | demo
pid | 1797957
leader_pid |
usesysid | 198352
usename | alice
application_name | DBeaver Community - SQLEditor <Script-1.sql>
client_addr | 191.168.9.5
client_hostname |
client_port | 52340
backend_start | 2025-10-07 10:42:51.328044+03
xact_start | 2025-10-07 10:42:51.328044+03
query_start | 2025-10-07 10:42:51.328044+03
state_change | 2025-10-07 10:42:51.328044+03
wait_event_type |
wait_event |
state | active
backend_xid |
backend_xmin | 7406335
query_id |
query | SELECT * FROM employee WHERE first_name = 'Пётр' +
backend_type | client backend