eulerto/pg_similarity

Empty strings with ~*~ crashes server

robins opened this issue · 0 comments

Brief

Empty strings with ~*~ crashes server

Repro

SELECT '' ~*~ '';

SQL Output

db=> SELECT version();
-[ RECORD 1 ]---------------------------------------------------------------------------------------------------
version | PostgreSQL 13.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6), 64-bit

db=> SELECT '' ~*~ '';
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!?>