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?
How to make ARRAY field with foreign key constraint in SQLAlchemy?
Asked Answered
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.
[link] (https://mcmap.net/q/814504/-using-postgresql-array-to-store-many-to-many-relationship ) Using PostgreSQL array to store many-to-many relationship –
Consonantal
© 2022 - 2024 — McMap. All rights reserved.