Thread: [INTERFACES] win32 libpq version is "too new"
Hello, I'm trying to run Delphi test programs using win32 client DLL for 6.4.2. But our Linux backend is older and I'm getting "unsupported frontend protocol" from it. I *can not* update the backend so: Is there a binary version of the Windows client DLL that works with postgresql_6.3.2-8? And then, where could I download it? Another try: can I use any option to force the client to be backwards compatible without recompiling it? Maybe in the connect call? I've found in archives that it can be changed using #defines and recompiling the sources, but installing VC++ just for this is a little annoying O:) TIA, Nico
nico@clubdelphi.com (Nicolas Aragon) writes: > I *can not* update the backend so: You really ought to reconsider that -- 6.4.* is noticeably more stable than 6.3.2 in my experience. And a 6.4 server will still talk to 6.3 clients, if that's what you're worried about. > Is there a binary version of the Windows client DLL that works with > postgresql_6.3.2-8? And then, where could I download it? You will need to look for a 6.3 version of the DLL. I haven't got one, but perhaps someone else does. > Another try: can I use any option to force the client to be backwards > compatible without recompiling it? Maybe in the connect call? No, there is no way that 6.4 libpq can be persuaded to talk to a 6.3 server; it depends in some fundamental ways on features of the newer protocol. Revising a #define or three will not do the trick. If it were that easy, we wouldn't have broken compatibility in the first place. regards, tom lane
> > Is there a binary version of the Windows client DLL that works with > > postgresql_6.3.2-8? And then, where could I download it? > > You will need to look for a 6.3 version of the DLL. I > haven't got one, > but perhaps someone else does. I beleive there is none. At least not native Win32. There were major changes required to libpq to make it possible to run it under Win32, and these changes appeared in 6.4. It would be possible to do it for 6.3, but it would require a huge amount of work. The pre-6.4 libpq client used fdopen() and then the fxxx() operations on the sockets. This does not work under Win32. 6.4 started using the direct send() and recv() calls, which are portable to Windows. //Magnus
Magnus Hagander <mha@sollentuna.net> writes: > I beleive there is none. At least not native Win32. There were major changes > required to libpq to make it possible to run it under Win32, and these > changes appeared in 6.4. > It would be possible to do it for 6.3, but it would require a huge amount of > work. The pre-6.4 libpq client used fdopen() and then the fxxx() operations > on the sockets. This does not work under Win32. 6.4 started using the direct > send() and recv() calls, which are portable to Windows. Ah, I had forgotten that connection. Yup, it was all the same rewrite of libpq that both made it dependent on the new-for-6.4 protocol and converted it to use direct socket calls. When I did that I had no idea I was making it practical to port the library to Windows ;-) --- that was a pleasant side-effect. So it may be that indeed there is no DLL available for 6.3. Sorry... regards, tom lane
Hello, >I was making it practical to port the library to Windows ;-) --- that >was a pleasant side-effect. Not bad for a side-effect! >So it may be that indeed there is no DLL available for 6.3. Sorry... Fortunately, I'm obstinated enough to convince anybody, though in Spain you're not allowed to own a gun :) Thanks to you and Magnus, Nico