Re: using regular expression queries with regular expression indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux