Re: ts_locale.c: why no t_isalnum() test?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-10-19T22:39:32Z
Lists: pgsql-hackers
Corey Huinker <corey.huinker@gmail.com> writes:
> I see this is already committed, but I'm curious, why do t_isalpha and
> t_isdigit have the pair of /* TODO */ comments? This unfinished business
> isn't explained anywhere in the file.

We really ought to be consulting the locale/collation passed to
the SQL-level operator or function that's calling these things,
instead of hard-wiring the database default.  Passing that down
would take a large and boring patch, but somebody ought to tackle
it someday.

			regards, tom lane



Commits

  1. Remove useless character-length checks in contrib/ltree.

  2. Introduce t_isalnum() to replace t_isalpha() || t_isdigit() tests.