Mohsen Alimomeni <m.alimom...@gmail.com> writes: > 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.
You want to set PASSEDBYVALUE (And you probably want to adjust alignment though I don't think it's causing any problem aside from wasted space) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers