Skip to content

Releases: hydradatabase/pg_stringtheory

v1.0.1

06 Feb 20:50
72868a3
Compare
Choose a tag to compare

Bug fixes.

v1.0.0

25 Jan 20:18
7dd46a8
Compare
Choose a tag to compare

1.0.0

Initial release.

pg_stringtheory is a CPU-specific optimization for string comparison operators using SSE4.2 on x86_64 platforms, and SWAR64 on aarch64 and arm64 platforms. It implements two functions:

  • stringtheory.equals(a TEXT, b TEXT) - returns BOOLEAN, true if there is an exact match, and false if there is not.

  • stringtheory.strstr(haystack TEXT, needle TEXT) - returns INTEGER, the position of where the needle is found in the haystack, or -1 if it is not found.

Note that this extension will not run on all CPUs and architectures. In the future, CPU features may be detected (e.g. using google/cpu_features), but this is not currently implemented.