LIKE or match by beginning for binary strings in PostgreSQL
1
vote
1
answer
1146
views
I need to match a binary column with its beginning.
For text columns it's easy:
LIKE 'image/%'
. This uses BTREE index if any.
Is it possible to do this also using an index for a binary column?
BTW, I store UTF-8 encoded strings in Binary, because there is no hard standard that all of them are UTF-8. So, I store a binary representation (maybe even with \0 (zero) bytes), as I cannot use UTF-8.
Asked by porton
(745 rep)
Feb 5, 2022, 02:54 AM
Last activity: Dec 25, 2022, 03:00 PM
Last activity: Dec 25, 2022, 03:00 PM