Re: Hash Support Function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Hash Support Function
Date: 2013-09-07 14:27:02
Message-ID: 31075.1378564022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com> writes:
> I'm developing a new type, and want to have hash index on it.
> I must write a hash function for the new type, according to the PG manual,
> section 35.14.3.
> However, there is no example for this function. Actually signature of the
> hash support function
> would be sufficient for me.

hashfunc(yourtype) returns integer strict immutable

For examples see hashint4, hashfloat8, hashtext, and many others.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-09-07 19:09:58 Re: Is this a bug in ECPG?
Previous Message Tom Lane 2013-09-07 14:20:16 Re: Constraint exclusion and overlapping range checks