From: | "Booth, Robert" <Robert_Booth(at)intuit(dot)com> |
---|---|
To: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
Subject: | fmgr_info: function 0: cache lookup failed |
Date: | 2002-03-11 21:40:56 |
Message-ID: | 419D2EB7B461D411A53B00508B69181D037B28BE@sdex02.sd.intuit.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Lane | 2002-03-11 21:50:42 | Automatic mod time? |
Previous Message | Jeffrey W. Baker | 2002-03-11 21:38:49 | Re: pg_toast table growth out of control |