From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "Michael Meskes (meskes(at)postgresql(dot)org)" <meskes(at)postgresql(dot)org> |
Subject: | Re: [bug fix] ECPG: freeing memory for pgtypes crashes on Windows |
Date: | 2018-02-04 22:17:11 |
Message-ID: | CAEepm=2k8VXcNUDEeECjMeGZ0c0O55iP_opvgNbxQ=5CP4+bHg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Feb 2, 2018 at 3:47 PM, Tsunakawa, Takayuki
<tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote:
> The fix is to add PGTYPES_free() in libpgtypes.dll, just like libpq has PQfreemem() described here:
+#ifndef PGTYPES_FREE
+#define PGTYPES_FREE
+ extern void PGTYPES_free(void *ptr);
+#endif
It seems quite strange to repeat this in pgtypes_date.h,
pgtypes_interval.h and pgtypes_numeric.h. I guess you might not want
to introduce a new common header file so that his can be back-patched
more easily? Not sure if there is a project policy about that, but it
seems unfortunate to introduce maintenance burden by duplicating this.
+ <function>PGTYPES_free()/<function> instead of <function>free()</function>.
The "/" needs to move inside then closing tag.
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2018-02-05 00:35:40 | Re: [HACKERS] Adding column_constraint description in ALTER TABLE synopsis |
Previous Message | Mark Rofail | 2018-02-04 21:58:21 | Re: [HACKERS] GSoC 2017: Foreign Key Arrays |