| От | Joe Conway |
|---|---|
| Тема | Re: c extension |
| Дата | |
| Msg-id | 4188F207.3030702@joeconway.com обсуждение исходный текст |
| Ответ на | c extension (Kjetil Haaland <kjetil.haaland@student.uib.no>) |
| Ответы |
Re: c extension
|
| Список | pgsql-novice |
Kjetil Haaland wrote: > I am writing a c extension function to my postgres database and in this i am > trying to allocate memory space for a table of char. When i try to call a > function that returns a value from this table postgres crashes. It works fine > running it as c code. I have added part of the code and hope that someone can > help me. > scoreChar = (char*)palloc(20*sizeof(char)); It doesn't look like that palloc is done in a sufficiently long-lived memory context. Read up on them in src/backend/utils/mmgr/README. Joe
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера