Using a library compiled for 8.3 in 8.2

Started by Marcelo de Moraes Serpaalmost 19 years ago2 messagesgeneral
Jump to latest
#1Marcelo de Moraes Serpa
celoserpa@gmail.com

Hello!

Today, I have finally managed to compile PostgreSQL 8.3devel using Visual
C++ 2005 on Windows XP PRO. It was a tough process as I've never hacked such
a big OS project like PGSQL. I did it becouse I needed to develop some C
functions that will be exported as functions to be called as Stored
Procedures. The dll compiled well, however, when I try to create it in the
database using the CREATE OR REPLACE FUNCTION, I get the following error
message:

ERROR: incompatible library "C:\Arquivos de
programas\PostgreSQL\8.2\lib\sgipgfunc.dll": version mismatch
SQL state: XX000
Detail: Server is version 8.2, library is version 8.3.

How could I make it work with 8.2 without having to download the 8.2 source
code and compiling it? Is there a way to do that?

Thanks in advance,

Marcelo.

#2Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Marcelo de Moraes Serpa (#1)
Re: Using a library compiled for 8.3 in 8.2

Marcelo de Moraes Serpa escribi�:

Hello!

Today, I have finally managed to compile PostgreSQL 8.3devel using Visual
C++ 2005 on Windows XP PRO. It was a tough process as I've never hacked such
a big OS project like PGSQL. I did it becouse I needed to develop some C
functions that will be exported as functions to be called as Stored
Procedures. The dll compiled well, however, when I try to create it in the
database using the CREATE OR REPLACE FUNCTION, I get the following error
message:

You are wasting your time. You need to install mingw to be able to
compile Postgres 8.2 on Windows. The changes to make 8.3 compilable on
MSVC were extensive, and backporting them (which you'd have to do
singlehandedly I imagine) would take much more time than installing
mingw in the first place.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.