pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alfred Perlstein <bright@wintelcom.net>
To: Steve Howe <howe@carcass.dhs.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Must implement PQnotifyFree()
Date: Sun, 14 Jan 2001 19:34:52 -0800
Message-ID: <20010114193452.R7240@fw.wintelcom.net> (raw)
In-Reply-To: <93m1gm$8vd$1@news.tht.net>
References: <93m1gm$8vd$1@news.tht.net>

* Steve Howe <howe@carcass.dhs.org> [010114 16:52] wrote:
> Hi folks,
> 
> 
>         I'm co-developer of Delphi and Borland C++ Builder Zeos library
> (http://www.zeos.dn.ua) by Sergey Seroukhov which includes support for
> PostgreSQL. In fact, I'm dedicated Zeos PostgreSQL developer.
>         We've run into a problem that we can't properly free the PPGnotify
> handle returned by PQnotifies() - simply because Delphi does NOT include
> free() routine (it does have it's own memory management routines of course).
> We could assume MSVC's malloc() is used and import free() from it, like
> this:
>         procedure free(P: Pointer); cdecl; external 'msvcrt.dll'; // (which
> is the Delphi/Pascal equivalent of C's free())
> 
> - but that would be a crude hack and would probably not work in platforms
> other then windows (Kylix, Delphi's encarnation on Linux, is almost ready as
> most of you should know) or libpq.dll compiled with other C compilers then
> then currently being used.
>         That's why we believe a PQnotifyFree() or similar function should be
> implemented since not everybody using libpq.dll is also using MSVC compiler.
> That could also lead to problems in other platforms using compilers with
> different allocation schemes.
>         Of course it is trivial to implement such a function and this should
> be no trouble.
> 
>         Could you please consider it ? Of course nobody wants memory
> corruption in their applications and we don't like having to let those
> records allocated, but we can't currently do much about it.

Actually, you can submit a patch for the library and documentation, I've
had a lot of luck getting the Postgresql developers to accept new/fixed
code.

Add the function and send a patch in context format (diff -c).

Best of luck,
-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."



view thread (2+ messages)

Message-ID: <20010114193452.R7240@fw.wintelcom.net>
Permalink:  ../20010114193452.R7240@fw.wintelcom.net/
Also on:    postgresql.org/message-id/20010114193452.R7240@fw.wintelcom.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: bright@wintelcom.net, howe@carcass.dhs.org
  Subject: Re: Must implement PQnotifyFree()
  In-Reply-To: <20010114193452.R7240@fw.wintelcom.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox