======Calendar.Events table====== The [[Calendar]].Events table contains a record of all the events in calendars managed by VPOP3. An 'event' is an iCalendar event. Note that if an event is a recurring series, there will only be one 'event' in the database, not one event per instance of the recurrence. =====Columns===== * id - this is a [[http://www.postgresql.org/docs/9.0/static/datatype-numeric.html|bigint]] sequential value which identifies the event uniquely in the database * calid - this is an integer which specifies which [[calendar_calendar|calendar]] this event is contained within * scopestart - this is a timestamp which indicates when the event starts. Note that if this is a recurring event, the 'scopestart' indicates when the **recurrence series** starts, NOT when a single instance of the series starts * scopeend - this is a timestamp which indicates when the event ends. Note that if this is a recurring event, the 'scopeend' indicates when the **recurrence series** ends, NOT when a single instance of the series ends * created - this is a timestamp indicating when the event was created - this is set automatically by a trigger * lastupdate - this is a timestamp indicating when the event was last updated - this is set automatically by a trigger * filename - this is the iCalendar 'filename' used within CalDAV * content - this is text containing the iCalendar event (VEVENT) description * recurrence - this is a boolean indicating whether the event is a recurring event (true) or a single event (false) Note that the database does not directly contain most of the data about the event, such as description, alarms, duration, etc. That data is stored in the iCalendar event stored in the **content** field. If you are looking for events occurring at a certain time, you can use the 'scopestart' and 'scopeend' fields to narrow down the search, but then, for any recurring events, you must examine the iCalendar content, and process any recurring rules/exceptions in there to determine whether the event is actually occurring at the required time. This is not a trivial task! To be able to do anything useful with this data, you will probably need to read and understand the [[http://tools.ietf.org/html/rfc5545|iCalendar specification]].