Mark Steben schrieb am 25.06.2020 um 18:45:
I have a query that uses regexp code to confirm if a text field is a date or not.
Why don't you define it as a date column? (e.g. so that leap years are corretly dealt with) But if you can't do that, what about a generated column that uses that regex to populate a boolean flag, e.g. is_valid_date? Then the expensive regex evaluation would only be done when you change the value, not everytime you query it. Thomas