Search Postgresql Archives

Re: Operators on ranges with a domain subtype do not implicitly cast operands of the domain's base type

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

 



dpopowich@xxxxxxxxxxxxxxx wrote:

I'm using PG 14 and have an application using a custom range with a custom domain subtype. My problem: PG does not do an implicit cast from the domain's base type when used with range operators.

I hit what looks to be the same issue. I reported in here:


David Johnston said that he thought that it was a bug.

My workaround is to typecast the two operands explicitly back to their base types.

I don't think that there's any magic to fix it declaratively. My guess is that you might work around it with a user-defined operator for the domains in question that hides the typecasts in its implementation function. (This has worked for me in other cases for other reasons. But I didn't try that in my testcase.)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux