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: Tue, 27 Dec 2011 10:10:02 -0800
Message-ID: <4EFA09FA.6000902@ejurka.com> (raw)
In-Reply-To: <CALBNtw6Ko7Grv9sbwNN9ndNidUL5Wct9yF6coCknvhR6ScPjOw@mail.gmail.com>
References: <CALBNtw6S9hkouW=m-quHw_TZD=SQi-NJKE+NCKkHOS3wh1O_1w@mail.gmail.com>
<4EF94368.8020200@ejurka.com>
<CALBNtw6Ko7Grv9sbwNN9ndNidUL5Wct9yF6coCknvhR6ScPjOw@mail.gmail.com>
On 12/27/2011 9:41 AM, Bear Giles wrote:
>
> 1) what are the two methods that are required for hash joins. I'm sure
> they're related to the hashCode method but I haven't come across how to
> make the link.
You're still thinking about the Java side, but you really need to think
about this from the postgresql side. Postgresql determines the hash
function for a type by looking up it's hash operator class definition.
It might be best to look at some sample opclass definitions for btree
and hash to figure out how to define the ordering and hashing operations
you want. Perhaps look at contrib/isn?
> 2) I'm having problems defining one of my operations. The UDT is
> "Rational", for rational numbers. I don't have a problem defining the
> ordering operations between two rational values but I'm also trying to
> define ordering operations between a Rational and a float8.
>
I'm not sure what's going on here.
> 3) What about aggregate functions? Sum(), min(), etc. Are they just
> functions that take a SETOF (sql) and array (java)?
>
See CREATE AGGREGATE.
Kris Jurka
view thread (4+ messages)
Message-ID: <4EFA09FA.6000902@ejurka.com>
Permalink: ../4EFA09FA.6000902@ejurka.com/
Also on: postgresql.org/message-id/4EFA09FA.6000902@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: <4EFA09FA.6000902@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