问题
How to make column with ARRAY(Integer) type, where each integer is primary key from some other table? If it's impossible, how to achieve similar table relationships with other method?
回答1:
As of PostgreSQL 9.3, this is not implemented, see http://blog.2ndquadrant.com/postgresql-9-3-development-array-element-foreign-keys/ One should turn array into other table.
来源:https://stackoverflow.com/questions/21932489/how-to-make-array-field-with-foreign-key-constraint-in-sqlalchemy