petropavel13 / pg_rrule

RRULE data type for PostgreSQL
MIT License
161 stars 29 forks source link

RRULE type cannot be stored #20

Open Natureshadow opened 2 months ago

Natureshadow commented 2 months ago

Storing RRULEs in their compiled form leads to segmentation faults upon retrieval. This happens due to the icalrecurrencetype having an icaltimetype field, which in turn has a pointer to icaltimezone:

https://github.com/Marketcircle/libical/blob/4272d2f81851a37bb08d9ac977a2f672b54e2a20/src/libical/icaltime.h#L136

For obvious reasons, structs with pointers cannot be safely stored in Postgres heap files.

I don't know of any way to prevent a type from being stored, but maybe this should be documented with a huge red flag.