File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ extern "C" {
22#include " postgres.h"
33
44#include " fmgr.h"
5+ #include " mb/pg_wchar.h"
6+
57#if PG_VERSION_NUM >= 160000
68#include " varatt.h"
79#endif
@@ -73,7 +75,8 @@ Datum pg_strstr(PG_FUNCTION_ARGS) {
7375 }
7476
7577 /* Get the results from the simd functions. */
76- size_t ret = fast_strstr (VARDATA (left), len_left, VARDATA (right), len_right);
78+ size_t ret =
79+ fast_strstr (VARDATA_ANY (left), len_left, VARDATA_ANY (right), len_right);
7780
7881 PG_RETURN_INT32 (ret);
7982}
@@ -98,7 +101,8 @@ Datum pg_equals(PG_FUNCTION_ARGS) {
98101 }
99102
100103 /* Get the results from the simd functions. */
101- size_t ret = fast_strstr (VARDATA (left), len_left, VARDATA (right), len_right);
104+ size_t ret =
105+ fast_strstr (VARDATA_ANY (left), len_left, VARDATA_ANY (right), len_right);
102106
103107 /* If the result is 0, strings are equal. */
104108 PG_RETURN_BOOL (ret == 0 );
You can’t perform that action at this time.
0 commit comments