Dear Sir,
I want to use plpgsql as a program language in my postgres, and install it reference to the document in postgres.
I do the following:
1. Login postgres database
2. Enter the script:
create function plpgsql_call_handler() returns OPAQUE as
' /usr/lib/plpgsql.so' language 'C';
create trusted procedural language 'plpgsql'
handler plpgsql_call_handler
lancompiler 'PL/pgsql';
3.create a function like this:
create function test3(int4) returns int4 as
' begin
insert into customer values($1, 'China','Jesse');
return 1;
end;
' language 'plpgsql;
and all the operation above return create and I use the following command to test the funciton:
select test3(1) as answer
but the system returns the error:
ERROR: fmgr_info: Cache lookup for language %d failed 21153
Can you tell me what have happen and how can I use plpgsql in postgres?
My Mailaddress: JesseLee@soho.com
Thanks & Regards,
Jesse