agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] testing for equality in user-defined types in select statements
Date: Mon, 26 Dec 2011 20:02:48 -0800
Message-ID: <4EF94368.8020200@ejurka.com> (raw)
In-Reply-To: <CALBNtw6S9hkouW=m-quHw_TZD=SQi-NJKE+NCKkHOS3wh1O_1w@mail.gmail.com>
References: <CALBNtw6S9hkouW=m-quHw_TZD=SQi-NJKE+NCKkHOS3wh1O_1w@mail.gmail.com>
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
view thread (4+ messages) latest in thread
Message-ID: <4EF94368.8020200@ejurka.com>
Permalink: ../4EF94368.8020200@ejurka.com/
Also on: postgresql.org/message-id/4EF94368.8020200@ejurka.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] testing for equality in user-defined types in select statements
In-Reply-To: <4EF94368.8020200@ejurka.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox