Skip to content

Extension tag R (ASCII R) holds the relations of a table: its foreign keys and, for an interleaved table, the interleave parent.

varint nfk ‖ nfk × (varint ncols ‖ varint column* ‖ str parent ‖ on_delete u8) ‖ has_interleave u8 ‖ [str interleave_parent]

on_delete is 0 RESTRICT, 1 CASCADE, 2 SET NULL or 3 NO ACTION. has_interleave is 1 when an interleave parent follows and 0 otherwise. The tag is omitted when the table has neither foreign keys nor an interleave parent. Column indexes must be below the column count.

Foreign key names and ON UPDATE actions are stored in Ext S and Ext M. How foreign keys are served is on Foreign keys.