fmgr_info: function 0: cache lookup failed

Поиск
Список
Период
Сортировка
Искать
От
Booth, Robert
Тема
fmgr_info: function 0: cache lookup failed
Дата
Msg-id
419D2EB7B461D411A53B00508B69181D037B28BE@sdex02.sd.intuit.com
Список
Дерево обсуждения
Re: fmgr_info: function 0: cache lookup failed "Booth, Robert" <Robert_Booth@intuit.com>
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 по дате отправления
От: Jeffrey W. Baker
Дата:
От: Dan Langille
Дата:
FAQ