-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This is probably a very similar issue to #129 in that it simply requires extension of the parser.
The code I'm hacking on:
CREATE OR REPLACE FUNCTION api._cuidin(cstring) RETURNS api._cuid AS 'textin' LANGUAGE internal STABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION api._cuidout(api._cuid) RETURNS cstring AS 'textout' LANGUAGE internal STABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION api._cuidrecv(internal) RETURNS api._cuid AS 'textrecv' LANGUAGE internal STABLE PARALLEL SAFE;
CREATE OR REPLACE FUNCTION api._cuidsend(api._cuid) RETURNS bytea AS 'textsend' LANGUAGE internal STABLE PARALLEL SAFE;
CREATE TYPE api._cuid (
INPUT = api._cuidin,
OUTPUT = api._cuidout,
RECEIVE = api._cuidrecv,
SEND = api._cuidsend
);
CREATE OR REPLACE FUNCTION api._cuid_text_eq(uid1 api._cuid, uid2 text) RETURNS bool AS $$
BEGIN
RAISE NOTICE 'custom equals';
RETURN uid1::text = uid2;
END;
$$ LANGUAGE plpgsql;
CREATE OPERATOR = (
FUNCTION = api._cuid_text_eq,
LEFTARG = api._cuid,
RIGHTARG = text
);
joe-re, eboody and KrisBraun
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request