From: | jurka at ejurka(dot)com (Kris Jurka) |
---|---|
To: | |
Subject: | [Pljava-dev] testing for equality in user-defined types in select statements |
Date: | 2011-12-27 04:02:48 |
Message-ID: | 4EF94368.8020200@ejurka.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
On 12/26/2011 7:41 PM, Bear Giles wrote:
> I have a UDT for rational numbers. I want to be able to add it in
> select statements but it doesn't work.
> >
> select f.value, f.foo, b.bar from foo f join bar b on (f.value =
> b.value);
>
> I vaguely recall that there were standard function names for this when I
> played with C UDT years ago but that was PSQL version 5.x or 6.x. Is
> that still the case? In either case the wiki should be updated.
>
You are looking for CREATE OPERATOR for equality/comparison and CREATE
OPERATOR CLASS for ordering definition. These are no different for
pljava types vs any other implemented type.
Kris Jurka
From | Date | Subject | |
---|---|---|---|
Next Message | Bear Giles | 2011-12-27 17:41:56 | [Pljava-dev] testing for equality in user-defined types in select statements |
Previous Message | Bear Giles | 2011-12-27 03:41:11 | [Pljava-dev] testing for equality in user-defined types in select statements |