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

2022-06-17 Thread Pavel Stehule
pá 17. 6. 2022 v 17:26 odesílatel Daniel Popowich napsal: > On Thu, Jun 16, 2022 at 4:26 PM Tom Lane wrote: > >> Daniel Popowich writes: >> > -- domain with underlying type of integer (what constraints we might >> > -- place on the integer values are not germane to the issue so >>

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

2022-06-17 Thread Daniel Popowich
On Thu, Jun 16, 2022 at 4:26 PM Tom Lane wrote: > Daniel Popowich writes: > > -- domain with underlying type of integer (what constraints we might > > -- place on the integer values are not germane to the issue so > they're > > -- left out). > > create domain zzzint integer; > >

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

2022-06-16 Thread Bryn Llewellyn
> dpopow...@artandlogic.com 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

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

2022-06-16 Thread Tom Lane
Daniel Popowich writes: > -- domain with underlying type of integer (what constraints we might > -- place on the integer values are not germane to the issue so they're > -- left out). > create domain zzzint integer; > -- a range on our domain > create type zzzrange as

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

2022-06-16 Thread Daniel Popowich
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. Below is a script that will demonstrate the problem (and below that, the output of running it with