| From: | Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru> | 
|---|---|
| To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | missing warning in pg_import_system_collations | 
| Date: | 2021-09-09 06:45:05 | 
| Message-ID: | 429d64ee-188d-3ce1-106a-53a8b45c4fce@postgrespro.ru | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hello hackers,
In pg_import_system_collations() there is this fragment of code:
enc = pg_get_encoding_from_locale(localebuf, false);
if (enc < 0)
{
	/* error message printed by pg_get_encoding_from_locale() */
	continue;
}
However, false passed to pg_get_encoding_from_locale() means 
write_message argument is false, so no error message is ever printed.
I propose an obvious patch (see attachment).
Introduced in aa17c06fb in January 2017 when debug was replaced by 
false, so I guess back-patching through 10 would be appropriate.
-- 
Anton Voloshin
Postgres Professional, The Russian Postgres Company
https://postgrespro.ru
| Attachment | Content-Type | Size | 
|---|---|---|
| pg_import_system_collations-warning.patch | text/x-patch | 522 bytes | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2021-09-09 06:53:38 | Re: Added schema level support for publication. | 
| Previous Message | Dinesh Chemuduru | 2021-09-09 06:23:26 | Re: [PROPOSAL] new diagnostic items for the dynamic sql |