So what you'll need to do is install SMW 1.5, ...
I highly discourage you, or anyone else, to run SMW 1.5. It has known security vulnerabilities, which have been fixed in following releases. The current stable version is 1.5.6. The next upcoming release of SMW, which will be 1.6, now works with PostGres (as far as I can tell) without any problems.
> I'm pretty sure my patch to bug #26202 fixes the problem
I applied the patch for SMW trunk, and it indeed fixes one (but not all) of the PostGres issues I found. Thanks for contributing :)
Jeroen De Dauw
Don't panic. Don't be evil.