Re: operator classes for index?

From: Yves Weißig <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator classes for index?
Date: 2011-04-26 12:42:33
Message-ID: 4DB6BDB9.2050202@rbg.informatik.tu-darmstadt.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Am 26.04.2011 14:28, schrieb Robert Haas:
> On Tue, Apr 26, 2011 at 5:18 AM, Yves Weißig
> <weissig(at)rbg(dot)informatik(dot)tu-darmstadt(dot)de> wrote:
>> CREATE OPERATOR CLASS abstime_ops
>> DEFAULT FOR TYPE abstime USING ebi FAMILY abstime_ops AS
>> OPERATOR 1 = (abstime,abstime),
>> FUNCTION 1 hashint4(abstime,abstime);
>>
>> it yields: ERROR: function hashint4(abstime, abstime) does not exist
>> though it exists (it is part of the hash AM), do I have to note the
>
> My copy of PostgreSQL has a hashint4(integer) function, but no
> hashint4(abstime, abstime) function.
>

Sorry.
Yes, I know, maybe my question wasn't clear enough. Following statement:
SELECT
am.amname AS index_method,
opfamily.opfname AS opfamily_name,
proc.proname AS procedure_name,
amproc.*,
typel.typname AS left_typname,
typer.typname AS right_typname
FROM
pg_am am,
pg_amproc amproc,
pg_proc proc,
pg_opfamily opfamily,
pg_type typel,
pg_type typer
WHERE
amproc.amprocfamily = opfamily.oid AND
amproc.amproc = proc.oid AND
opfamily.opfmethod = am.oid AND
am.amname = 'hash' AND
amproc.amproclefttype = typel.oid AND
amproc.amprocrighttype = typer.oid
ORDER BY opfamily_name, procedure_name;
I get:
"hash";"abstime_ops";"hashint4";2227;702;702;1;"hashint4";"abstime";"abstime"
as an entry and suppose that hashint4 also takes "abstime"
How is it done? How is hashint4 used to hash a value of "abstime"?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-26 13:06:45 Re: Proposal - asynchronous functions
Previous Message Stephen Frost 2011-04-26 12:32:18 Re: Proposal - asynchronous functions