I saw a use of the internal function glob(text)
and
couldn't find anything about it in the docs.
Thanks to https://gist.github.com/ianpgall/9492728#file-postgres-view-functions-sql:
> select * from showfunctions where function_definition ~ 'glob';
+---------+----------------------------+---------------------------------------------------------+
| lanname | function_definition | source |
+---------+----------------------------+---------------------------------------------------------+
| plpgsql | text = internal.glob(text) | \n\n |
| | | declare |
| | | output_pattern text; |
| | | begin |
| | | output_pattern = replace(input_glob, '*', '%'); |
| | | output_pattern = replace(output_pattern, '?', '_'); |
| | | return output_pattern; |
| | | end; |
| | | \n\n |
+---------+----------------------------+---------------------------------------------------------+