Skip to content

Add tsvector type support in DML adapter#796

Merged
kvch merged 2 commits into
xataio:mainfrom
utafrali:fix/issue-576-table-that-has-a-tsvector-column-doesn-t
May 19, 2026
Merged

Add tsvector type support in DML adapter#796
kvch merged 2 commits into
xataio:mainfrom
utafrali:fix/issue-576-table-that-has-a-tsvector-column-doesn-t

Conversation

@utafrali
Copy link
Copy Markdown
Contributor

Description

Fixes #576. Tables with tsvector columns were failing to replicate because the DML adapter didn't have a handler for that type. Added support by converting []byte values to strings before they get used in the copy operation.

Related Issues

#576

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changes Made

Added a case in updateValueForCopy to handle tsvector columns. When a tsvector value comes in as []byte from the WAL, it gets converted to a string. If it's already a string, it passes through unchanged.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed

Added two test cases: one for []byte input (which is what the WAL produces) and one for string input to cover both scenarios.

Code Quality

  • Code passes linting
  • Code passes tests
  • Generated files are up to date

@kvch
Copy link
Copy Markdown
Collaborator

kvch commented May 19, 2026

Thank you for this!

@kvch kvch merged commit 889b9ae into xataio:main May 19, 2026
6 of 7 checks passed
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.

Table that has a tsvector column doesn't get replicated and exists the program

2 participants