Postgresql and Underscore

TL;DR: Underscore is a matching character in LIKE queries to match a single character. I’m using Postgresql for one of my projects to store some python package metadata. Canonical python packages must be all lowercase and should not use underscores (_) but instead should use hyphens (-) as delimiters. It is just a recommendation and not enforced by PyPI or pip. I wanted to check how many packages in my database were using underscores....

December 20, 2023 · 1 min