Exporting tables from Access to PG using ODBC driver Greatbridge 1.00.0000.
Function in PG to check data validity:
CREATE FUNCTION my_MonthlyPayment (NUMERIC, NUMERIC, INTEGER)
RETURNS NUMERIC
-- Returns monthly payment for $1: loan
-- $2: annual interest rate, in %
-- $3: number of months
AS
'
SELECT CASE
WHEN $2 :: float = 0.00 THEN
($1 :: float / $3)
:: NUMERIC(7,2)
ELSE
($1 :: float * $2 :: float / 1200.00 *
(1.00 + $2 :: float / 1200.00) ^ $3 :: float /
((1.00 + $2 :: float / 1200.00) ^ $3 :: float - 1.00))
:: NUMERIC(7,2)
END
;'
LANGUAGE 'sql';
After some processing (query progress indicator at half) the following error
message pops up:
Error while executing the query(non-fatal);
ERROR: fmgr_info: function 1350878: cache lookup failed (#-1)
Please help.