>Am I using wrong memory context? Or is there anything else also I should keep in mind.
Yes it might be. Memory context of transaction is deleted at the end. If you want to preserved the information, you can allocated space for structure before begin transaction call.
Regards, Amul Sul
Hi,
Can you please tel me the location in code where I can allocate space before begin transaction call?
Right now, I am using spi_palloc function to alloctae memory to my structure instance. I want to insert 10 rows in a table and want to store the corresponding transaction ID in one link list. But, I am not able to store them in a link list I alway loose the previous information and hence cannot traverse the linklist to store new transaction Id at the end of link list
Some senior in my course said, I am using wrong memory context. Can anyone explain me the actual problem?
I have defined my struct in a header file and trying to create a simple link list in one .c file.