Hi,
To implement my local calendar, I tried adding a new type (pdate) to pgsql as an extension.
At first I used a struct of size 6, and I returned a pointer to it in pdate_in with no problem. Now I changed the type to int32, returning PG_RETURN_INT32. I removed all palloc calls. but the server crashes with segmentation fault before returning in pdate_in.
I changed PG_RETURN_INT32 to PG_RETURN_POINTER, but the problem isn't solved.
I checked everything, read chapter 34 of docs, but I couldn't solve the problem. I attached my files, if anyone can take a look at them.
thanks,
Mohsen Alimomeni