Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6861919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:35:47+00:00 2026-05-27T02:35:47+00:00

The following gives an error drop function testing(); CREATE FUNCTION testing() RETURNS text AS

  • 0

The following gives an error

drop function testing();
CREATE FUNCTION testing()
 RETURNS text
AS $$
import ctypes
try:
   ctypes.windll.LoadLibrary("D:\\jcc.dll")
except:
   import traceback
   plpy.error(traceback.format_exc())
return ''
$$ LANGUAGE plpythonu;
select testing();

Error message:

ERROR:  ('Traceback (most recent call last):\n  File "<string>", line 5, in __plpython_procedure_testing_1517640\n  File "D:\\Python26\\Lib\\ctypes\\__init__.py", line 431, in LoadLibrary\n    return self._dlltype(name)\n  File "D:\\Python26\\Lib\\ctypes\\__init__.py", line 353, in __init__\n    self._handle = _dlopen(self._name, mode)\nWindowsError: [Error 126] The specified module could not be found\n',)

It works fine in a python interpretor.

Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.windll.LoadLibrary("D:\\jcc.dll")
<WinDLL 'D:\jcc.dll', handle 410000 at 1d9cb10>
>>>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:35:48+00:00Added an answer on May 27, 2026 at 2:35 am

    “The specified module could not be found” is one of those helpful error messages Windows emits that doesn’t always mean what you think it means.

    Windows will produce that message if the DLL you tried to load or any dll it depends on could not be found.

    Since PostgreSQL runs in its own user account it has a different PATH to that which your interpreter runs in when you’re testing. If jcc.dll depends on (say) c:\jccsupportfiles\aaa.dll and c:\jccsupportfiles is on your PATH but not the Pg server’s PATH, that would explain your problem.

    Try using Dependency Walker (depends.exe) to determine which DLLs your DLL requires and where they are. See if it’s a PATH issue.

    Rather than messing with the Pg server’s PATH, consider just putting all the DLLs required by jcc.dll in the same directory as jcc.dll. IIRC Windows will always look in the same directory as the module it’s loading first when it tries to load a module it depends on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the following code, g++ gives this error : 1.cpp: In member function void
The following code in javascript gives me the error this.callback is not a function
When I try to create a new project($ rails new first_app) it gives following
In C++ the following code gives a compiler error: void destruct1 (int * item)
Any ideas why does the entity framework in LINQ gives following strange error: Unable
Can't get to my site. Apache gives the following error message: [Fri Sep 05
In the sample code, the line with the 'error comment' gives the following the
Just installed the SDK and ADK. while updating, it gives the following error: unexpected
When I run the following Silverlight app, it gives me the error : AG_E_PARSER_BAD_PROPERTY_VALUE
The following code gives an error: [1.0-ml] XDMP-UNDVAR: (err:XPST0008) Undefined variable $ename However if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.