Re: uuid_hash declaration

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Mel Flynn <mel(dot)flynn+pgsql(at)mailing(dot)thruhere(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: uuid_hash declaration
Date: 2009-07-13 08:57:23
Message-ID: 87eislneoc.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mel Flynn <mel(dot)flynn+pgsql(at)mailing(dot)thruhere(dot)net> writes:

> Is there a way in the API to tell the backend that "uuid_hash function is
> implemented by the foo__uuid_hash function" so that backwards compatibility
> isn't broken?

Yes.
http://www.postgresql.org/docs/8.3/interactive/xfunc-c.html#XFUNC-C-PGXS

For example:

CREATE OR REPLACE FUNCTION uuid_hash(uuid)
RETURNS bool
AS 'MODULE_PATHNAME', my_uuid_hash
LANGUAGE 'C' IMMUTABLE STRICT;

Regards,
--
dim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-07-13 09:35:56 Re: Start With... Connect By?
Previous Message IVO GELOV 2009-07-13 08:42:01 Re: Rule acting as REPLACE INTO behave strange