I have a varchar field that has a key that is made up of a string that sometimes has some pattern to it, which starts with a name & timestamp.
I'd like to support deleting old records that have a given prefix, and I want run a query like DELETE FROM table WHERE key < %s
, but I want to know exactly what I'm getting myself into. I can't find any official docs about how this should work. Do they exist? I found Practical Postgres book that mentions it's based on alphabetical order, but I'm not sure if that is still true in any official docs. Is there anything up-to-date I can refer to other than my poking around?