| From: | Анатолий <anatoly(at)email(dot)su> |
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Possibly a bug |
| Date: | 2026-02-09 12:41:30 |
| Message-ID: | c743e514-40c7-4960-96a6-38d9f17eaf76@email.su |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hello. If the *user* parameter is passed to a function, the other
parameter is not converted to uppercase (if it is cirillic). The same
with procedures and if you swap the params.
/create or replace function to_upper_first(param1 text, param2 text)
returns text as
$$
select upper(param1) || ' ' || upper(param2) || ' ' || param2;
$$ language sql;
select version();
select to_upper_first('тест', *user*::text);/
Output:
134 ms
CREATE FUNCTION
version
--------------------------------------------------------------------------------------------------------------------
PostgreSQL 18.1 (Debian 18.1-1.pgdg13+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
(1 row)
to_upper_first
--------------------------------------------------------
тест USER_44D38K4ZB_44D4GQVSV user_44d38k4zb_44d4gqvsv
(1 row)
/https://onecompiler.com/postgresql/44d4fxa3x/
/---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------/
select to_upper_first('test', user::text);
to_upper_first
--------------------------------------------------------
TEST USER_44D38K6QJ_44D4GTCEM user_44d38k6qj_44d4gtcem
(1 row)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-02-09 16:14:36 | Re: Possibly a bug |
| Previous Message | PG Bug reporting form | 2026-02-09 11:33:58 | BUG #19398: Non-existent repositories are used |