Re: Add function to release an allocated SQLDA

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Add function to release an allocated SQLDA
Дата
Msg-id CAEepm=1jxusHTggg+k+0pdjwOMPakR1QHp=oDU5TV+BFX3VWkg@mail.gmail.com
обсуждение исходный текст
Ответ на Add function to release an allocated SQLDA  ("Kato, Sho" <kato-sho@jp.fujitsu.com>)
Ответы RE: Add function to release an allocated SQLDA  ("Kato, Sho" <kato-sho@jp.fujitsu.com>)
Список pgsql-hackers
On Wed, Jun 13, 2018 at 4:29 PM, Kato, Sho <kato-sho@jp.fujitsu.com> wrote:
> I add a function called ECPGfreeSQLDA() becasue there is no API for releasing the SQLDA stored the result set.

Hello Kato-san,

Thank you for sending the patch!

+     Alternatively, use the standard C library's free() function as
in the example below.

+      If the result set contains more than one record, an SQLDA
corresponding to each records is saved as linked list.
+      There is a possibility to free allocated memory area doubly and
cause the application crash,
+      because ECPGfreeSQLDA() releases all SQLDAs associated with the
specified the SQLDA.

This is not clear to me.  ECPGfreeSQLDA() releases a whole chain, but
free() only releases a single SQLDA(), so they are obviously not
interchangeable.  When exactly should a user prefer one over the
other?  If there is a good reason to free just one OR the whole chain,
shouldn't we provide a way to do both of those things without the user
having to use libc free(), for the benefit of Windows users who can't
safely use free()?

- * the new partition's info into its partition descriptor.  If there is a
+ * the new partition's info into its partition descriptor.  If there is a

This seems to be a spurious hunk, but I cannot see what changed.

-- 
Thomas Munro
http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Remove mention in docs that foreign keys on partitioned tablesare not supported
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Concurrency bug in UPDATE of partition-key