Hello,
Some user hit a problem with ECPG on Windows. The attached patch is a fix for it. I'd appreciate it if you could
backportthis in all supported versions.
The problem is simple. free() in the following example crashes:
char *out;
out = PGTYPESnumeric_to_asc(...);
free(out);
The cause is the mismatch of the version of C runtime library. The version of Visual Studio used to build the
applicationwas different from that for building PostgreSQL (libpgtypes.dll).
The fix is to add PGTYPES_free() in libpgtypes.dll, just like libpq has PQfreemem() described here:
https://www.postgresql.org/docs/devel/static/libpq-misc.html
Regards
Takayuki Tsunakawa