fmgr_info: function 0: cache lookup failed - Mailing list pgsql-general

From Booth, Robert
Subject fmgr_info: function 0: cache lookup failed
Date
Msg-id 419D2EB7B461D411A53B00508B69181D037B28BE@sdex02.sd.intuit.com
Whole thread Raw
Responses Re: fmgr_info: function 0: cache lookup failed  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: fmgr_info: function 0: cache lookup failed  (Juliano Ignacio <jsignacio@yahoo.com>)
List pgsql-general
I'm porting an Access database to Postgres but keeping Access as the client.
I have been having problems with checkboxes and so I did some searching and
came across information that told me to uncheck Bools as Char in the ODBC
driver settings, I did that and started getting the following error:

ERROR:  Unable to identify an operator '=' for types 'boolean' and 'integer'
    You will have to retype this query using an explicit cast

So after some more searching I came across a message talking about adding
the function and an operator below to handle this problem:

CREATE FUNCTION MsAccessBool (bool, int4) RETURNS BOOL AS '
BEGIN
    IF $1 IS NULL THEN
        RETURN NULL;
    END IF;

    IF $1 IS TRUE THEN
        IF $2 <> 0 THEN
            RETURN TRUE;
        END IF;
    ELSE
        IF $2 = 0 THEN
            RETURN TRUE;
        END IF
    END IF;

    RETURN FALSE;
END ;
' LANGUAGE 'plpgsql';

CREATE OPERATOR = (
    LEFTARG = BOOL,
    RIGHTARG = INT4,
    PROCEDURE = MsAccessBool,
    COMMUTATOR = '=',
    NEGATOR = '<>',
    RESTRICT = EQSEL,
    JOIN = EQJOINSEL);

So I did this, and now I'm getting the "fmgr_info: function 0: cache lookup
failed" message.  I've again done some looking and the only thing I've found
is a message that talks about the oprrest and oprjoin fields in the
pg_operator table, but not what I need to do with them.  Any help would be
greatly appreciated.

Thanks,
Rob


pgsql-general by date:

Previous
From: "Jeffrey W. Baker"
Date:
Subject: Re: pg_toast table growth out of control
Next
From: "Dan Langille"
Date:
Subject: Re: using syslog to capture RAISE notices