Create Language plperl - Error: could not load library plperl.dll When I create language plperl , I get error: ERROR:  could not load library "C:/Program Files/PostgreSQL/9.1/lib/plperl.dll": The specified module could not be found.

But in my computer,  "plperl.dll" file is exist in "C:/Program Files/PostgreSQL/9.1/lib/..." folder   ( I can not post illustrative image, this forum require >= 10 reputations)

And if I select * pg_pltemplate, I get:

-[ RECORD 4 ]-+-------------------------
tmplname      | plperl
tmpltrusted   | t
tmpldbacreate | t
tmplhandler   | plperl_call_handler
tmplinline    | plperl_inline_handler
tmplvalidator | plperl_validator
tmpllibrary   | $libdir/plperl
Because I missed 3 files dll (MSVCR90.DLL, PERL514.DLL, IESHIMS.DLL) in Windows I could not install the language pl/Perl.

Here my steps to solve:


Using  "Dependency Walker" tool to check dll files missing (if any). After installing, you open plperl.dll file and find errors.
Install dll files missing.
Install ActivePerl (to install Perl on window, It will automatically set Perl bin folder to windows environment variable)
Restart postgresql service 
Test: 

    createlang -U postgres plperl postgre  (it's ok)
    CREATE or replace LANGUAGE plperl      (it's ok)



Download (I just can post 2 links)


Dependency Walker tool: http://www.dependencywalker.com/ 


Reference: http://www.mkyong.com/database/install-perl-in-postgresql-the-specified-module-could-not-be-found/