[tarantool-patches] Re: [PATCH] sql: rfc for foreign keys

n.pettik korablev at tarantool.org
Fri Jul 13 16:53:11 MSK 2018


>> Part of #3271
>> ---
>> Branch: https://github.com/tarantool/tarantool/tree/np/gh-3271-foreign-keys-rfc
>> Issue: https://github.com/tarantool/tarantool/issues/3271
>> 
> 
> Please check with definition schema in the standard re table
> structure for information schema and constraint tables.
> 
> -- 
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
> http://tarantool.io - www.twitter.com/kostja_osipov

Well, actually I didn’t get well what you mean.

If you ask to make _fk_constraint table itself be closer to REFERENTIAL_CONSTRAINTS
from ANSI schema definition.. The best effort I am able to do now - rename it to
_referential_constraints..
See part 11 of 2003 standard: 6.3.3 REFERENTIAL_CONSTRAINTS base table:
All parts which we already have in Tarantool are represented in _fk_constraints.
Others such as CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA are omitted.
Moreover, it stores fields which are absent in ANSI: is_deferred and array of links.
IDK how to remove them from those space and persist at the same time.

If you suggest to implement additional table to represent FK constraints, then
I guess it makes no sense - we don’t have any of schema tables right now.



More information about the Tarantool-patches mailing list