| От | Tom Lane |
|---|---|
| Тема | Re: cleaning up in UDF's (user-defined functions) |
| Дата | |
| Msg-id | 21081.1086792821@sss.pgh.pa.us обсуждение |
| Ответ на | cleaning up in UDF's (user-defined functions) (craig perras <craigp98072@yahoo.com>) |
| Список | pgsql-interfaces |
craig perras <craigp98072@yahoo.com> writes:
> I appended an excerpt from the docs... IIUC, if I make
> a DSQL call from a UDF (written in C), and there's a
> transaction abort caused by that command, then my
> function is never called back. How do I cleanup any
> resources the function allocated if this is the case?
What resources? Most stuff (like palloc'd memory) is taken care of
for you. If you're maintaining your own private permanent data
structures then you may need to plug in a transaction-end hook
routine to clean those up.
pgsql-interfaces is hardly the place for discussing how to write
C-language server functions; if you want to discuss the fine points
I'd suggest pgsql-hackers.
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера