If this just needs this to be rendered for PostgreSQL, you can use the `func` generator:
`func` is a special namespace and will render UNKNOWN functions as you invoke them.
This simple solution to render the correct sql works for most people.
If you have more specific needs, such as using this within python comparisons, you will need to read the docs on Custom types (
https://docs.sqlalchemy.org/en/13/core/custom_types.html); if you need this to work on multiple different databases you may have to write a custom compiler for each supported one (
https://docs.sqlalchemy.org/en/13/core/compiler.html)