=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santama...@gmail.com> writes: > On Wed, Oct 6, 2021 at 11:09 AM Magnus Holmgren <magnus.holmg...@millnet.se> > wrote: >> There's just this tiny but seemingly obvious issue that I can't believe I >> haven't noticed until now: to_date(now(), 'TMmonth') returns 'october' in >> an >> English locale (en_US.UTF-8 at least). Names of months and weekdays are >> proper >> nouns and as such *always* capitalized in English, so that seems wrong to >> me.
> IMHO, the patterns of TO_CHAR() do as promised in the documentation [1]: > MONTH full upper case month name (blank-padded to 9 chars) > Month full capitalized month name (blank-padded to 9 chars) > month full lower case month name (blank-padded to 9 chars) > What you are proposing looks more like a new feature than a bug. Yeah, this is operating as designed and documented. The idea that there should be a way to get "month name as it'd be spelled mid-sentence" is an interesting one, but I really doubt that anyone would thank us for changing TMmonth to act that way. (Perhaps a new format code or modifier would be easier to swallow?) I also wonder exactly how the code would figure out what to do --- language-specific conventions for this are not information available from the libc locale APIs, AFAIR. regards, tom lane