Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: argument exceeds the maximum length of 1024 bytes #36

Open
andersonferbr opened this issue May 10, 2023 · 1 comment
Open

ERROR: argument exceeds the maximum length of 1024 bytes #36

andersonferbr opened this issue May 10, 2023 · 1 comment

Comments

@andersonferbr
Copy link

I'm having an issue when using the smithwaterman() function. I receive the following error:

SELECT content, smithwaterman(content, 'example word') FROM review;
SQL Error [22023]: ERROR: argument exceeds the maximum length of 1024 bytes

The size of the string exceeds the limit of 1024 bytes defined. I would like to know if it's possible to increase this limit. I believe that I may need to change the PGS_MAX_STR_LEN or PGS_MAX_TOKEN_LEN variable, but I'm not sure how to do that. Could someone guide me on how to set this variable in PostgreSQL? I appreciate any help in advance!

@eulerto
Copy link
Owner

eulerto commented May 11, 2023

It is not a dynamic setting. You need to modify PGS_MAX_STR_LEN in similarity.h and compile the source code. You don't need to change PGS_MAX_TOKEN_LEN.

BTW, why do you need to compare such a long string? Some of these algorithms are not designed to be used with long strings and the performance is terrible in such cases.

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

No branches or pull requests

2 participants