Re: [PATCH] Expand character set for ltree labels

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Garen Torikian <gjtorikian@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-10-05T19:56:24Z
Lists: pgsql-hackers
Garen Torikian <gjtorikian@gmail.com> writes:
>> Perhaps the docs are a bit unclear about that, but it's not
>> restricted to ASCII alphanumerics.  AFAICS the code will accept
>> whatever iswalpha() and iswdigit() will accept in the database's
>> default locale.

> Sorry but I don't think that is correct. Here is the single
> definition check of what constitutes a valid character:
> https://github.com/postgres/postgres/blob/c3315a7da57be720222b119385ed0f7ad7c15268/contrib/ltree/ltree.h#L129

> As you can see, there are no `is_*` calls at all.

Did you chase down what t_isalpha and t_isdigit do?

			regards, tom lane



Commits

  1. Allow hyphens in ltree labels

  2. Check that xmax didn't commit in freeze check.

  3. Push lpp variable closer to usage in heapgetpage()

  4. tests: Restrict pg_locks queries in advisory_locks.sql to current database