missing possibility to use alternative translated month names in to_char function

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: missing possibility to use alternative translated month names in to_char function
Date: 2026-08-11 15:06:34
Message-ID: CAFj8pRB6-Bzd=mC6f-aXC89=cXLGDZt2C4NeW1ZTXqFS0wJhXg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

My customer reported an interesting issue. He needs translated month name,
and then he use
to_char(current_date, 'tmmonth');

Unfortunately, glibc returns nouns in the genitive case instead of the
nominative case.

This is a glibc feature from the 2.28 release. Genitive case makes sense,
when the result holds a day, but without it, it is messy.

glibc has alternative month names, that can be taken by usage placeholder
'%OB' of function strftime.
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html -
see alt_mon.

Can we enhance prefixes (maybe tmo) to be possible to use alternative names?

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2026-08-11 15:14:12 Re: missing possibility to use alternative translated month names in to_char function
Previous Message Daniel Gustafsson 2026-08-11 14:56:16 Re: pg_control_checkpoint(): add "data_checksum_version" (Pg19)?