I have a table that is indexed by a UUID field, using postgres' uuid-ossp
extension, everything running on a python
application. Every time I filter the UUID field I have to explicitly cast the uuid field:
htsql = HTSQL('pgsql:///my_database')
htsql.produce("/product.filter(string(id) = '00002094-b1c3-11e3-92b8-6bb3666a756f')")
If I do not cast the id
I have the following error:
htsql.produce("/product.filter(id = '00002094-b1c3-11e3-92b8-6bb3666a756f')")
Cannot coerce values of types (opaque, untyped) to a common type
While translating:
/product.filter(id = '00002094-b1c3-11e3-92b8-6bb3666a756f')
It seems HTSQL do not recognize UUID type. So my question is:
Is there any way to tell HTSQL how to recognize a UUID? Can I do this on the command line interface as well?