Skip to content

Conversation

samirpatil2000
Copy link

@samirpatil2000 samirpatil2000 commented Oct 1, 2025

fix(checkpoint-postgres): correct escape sequence in Postgres regex split

Description

Fixes an incorrect escape sequence in the REGEXP_SPLIT_TO_ARRAY call used to parse namespace prefixes in
libs/checkpoint-postgres/langgraph/store/postgres/base.py.

The regex now uses a properly escaped dot ('\\.') so that splitting occurs only on literal periods rather than any character, ensuring accurate namespace aggregation in _get_batch_list_namespaces_queries.


Issue

N/A (no linked issue).


Dependencies

None


Notes

  • Changes the regex from '\.' to '\\.' inside SQL string literal to prevent unintended splitting behavior.
  • Backwards-compatible; no public API changes.
  • No new dependencies introduced.

Copy link

vercel bot commented Oct 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
langgraph-docs-preview Ignored Ignored Preview Oct 1, 2025 8:57pm

FROM (
SELECT part, ROW_NUMBER() OVER () AS idx
FROM UNNEST(REGEXP_SPLIT_TO_ARRAY(prefix, '\.')) AS part
FROM UNNEST(REGEXP_SPLIT_TO_ARRAY(prefix, '\\.')) AS part
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you include a test? that shows that this fails?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no test failing, it was giving warning in logs.

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.

2 participants