Skip site navigation (1) Skip section navigation (2)

Re: Python/Postgres Pygres for Win32 w/o cygwin

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: "SICEm, s(dot)l(dot)" <sicem(at)retemail(dot)es>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Python/Postgres Pygres for Win32 w/o cygwin
Date: 2001-05-24 13:50:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwin

This post is really more appropriate for one of the Python mailing lists
since it has much more to do with Python extensions than with PostgreSQL.

On Thu, May 24, 2001 at 04:38:22AM +0200, SICEm, s.l. wrote:
> The problem:    have Pygresql to use it with Python/Windows and wxPython
> Syntoms: Python2.1 crashes when loading _pg.dll (renamed _pgmodule.dll)
> Why? Python2.1/Win loading interfaces seems not to be the same than in
> Python2.1/cygwin

The above is true for all Python extensions.  Ones built for Cygwin
Python will not work for Win32 Python and vice versa.  The reason is
simple: Cygwin Python extensions import from libpython2.1.dll while
Win32 extensions import from python21.dll.  Mixing and matching will
either cause the Python interpreter to fail loading the extension or
(at least in the past) cause the interpreter to crash.

> Solution: Recompile pgmodule with includes and libs of Python2.1/win and
> the -mno-cygwin option (MINGW).

The above is the easiest solution -- another (more difficult) one is to
use Microsoft Visual Studio.

> I managed to recompile it and it works, but it behaves not the same:
> [snip]

Sorry, I can't help you with the above -- maybe someone on one of the
Python lists will know the answer.


Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA                 WWW:

In response to

pgsql-cygwin by date

Next:From: Bruce MomjianDate: 2001-05-24 16:53:36
Subject: Re: [PATCHES] Cygwin plpython patch
Previous:From: SICEm, s.l.Date: 2001-05-24 02:38:22
Subject: Python/Postgres Pygres for Win32 w/o cygwin

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group