Skip to content

Support hyphens in LTree labels and increase max label length#1272

Open
ragb wants to merge 1 commit intotypelevel:mainfrom
ragb:fix/ltree-hyphen-support
Open

Support hyphens in LTree labels and increase max label length#1272
ragb wants to merge 1 commit intotypelevel:mainfrom
ragb:fix/ltree-hyphen-support

Conversation

@ragb
Copy link

@ragb ragb commented Mar 15, 2026

Summary

  • Allow hyphens (-) in LTree labels, matching PostgreSQL 16+ behavior
  • Increase MaxLabelLength from 255 to 1000, matching PostgreSQL 16+ limit
  • Add tests for hyphen support in labels

Fixes #1271

Context

PostgreSQL 16 changed the ltree extension to accept hyphens in labels and increased the max label length from 256 to 1000. Previously (PostgreSQL 15 and earlier), only alphanumeric characters and underscores were allowed, with a 256-character limit.

Test plan

  • Existing LTreeTest passes
  • New test cases for hyphen-containing labels pass

PostgreSQL 16 added support for hyphens (-) in ltree labels and
increased the maximum label length from 256 to 1000 characters.

Fixes typelevel#1271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LTree: support hyphens in labels and increase max label length (PostgreSQL 16+)

1 participant