0

In PostgreSQL you can declare a column as an array

hashtags   text[]

Is where a way to declare an array of ids to some table(foreign keys)?

Combo
  • 685
  • 1
  • 9
  • 19
  • Also you could look here: https://stackoverflow.com/questions/41054507/postgresql-array-of-elements-that-each-are-a-foreign-key – Dimitri Mar 28 '19 at 10:04

1 Answers1

0

If with "to some table" you mean foreign keys, then no: arrays don't support foreign keys.

Neither "outgoing" (ids referencing other tables) foreign keys nor "incoming" (ids being referenced from other tables) foreign keys.

a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843