From: | jesselee(at)sohu(dot)com |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | How to create a new PL language in postgres |
Date: | 1999-12-17 08:35:19 |
Message-ID: | 8eef01bf4869$a6e25540$39b96aca@sohu.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)soho(dot)com
Thanks & Regards,
Jesse
From | Date | Subject | |
---|---|---|---|
Next Message | Jose Soares | 1999-12-17 09:39:49 | Re: [HACKERS] \copy problem |
Previous Message | Ed Loehr | 1999-12-17 07:58:33 | [GENERAL] How to get timestamped pgsql logging? |