oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
2.01k stars 98 forks source link

type "tstzrange" does not exist #134

Open LucienLee opened 3 years ago

LucienLee commented 3 years ago

I ran into the type "tstzrange" does not exist error when I init table with pg-mem.

It looks like range of timestamp type is not implemented. Could you help with this or give instructions on how to contribute to this issue.

Thank you!

oguimbal commented 3 years ago

Hi,

Sorry, I dont have time to work on pg-mem these days :(

If you're intetersted in contributing, you could create the underlying datatype.

The type system is not very mature, but you can get inspiration from geometic types to extend it.

Unfortunately, the binary operator support would require to implement operator overloading, which definitely is on the todo-list, but would require a significant refactoring.

The underlying idea would be to be able to declare custom operators like we can declare custom functions... And then to refactor this ugly hard-coded implementation of binary operators.

If you want to give it a try, you are more than welcome, but I unfortunatliy cannot tell you when I will have the time to do it myself :(