I have a problem with Timescale. I want to add foreign key referencing a regular table in my hypertable so that it then will be populated among my continuous aggregate views. I would like to achieve only one way relation.
for example having hypertable:
CREATE TABLE trees
(
name varchar(100),
type ???? -> here
);
I would like the field type to be a foreign key to regular tree_types table.
As of my knowledge the opposite situation is not supported by timescale (a foreign key in regular table referencing hypertable), but i also did not find any information how to solve my problem.
I have tried converting int column that’s passed from hypertable to the views to foreign key but i also failed.
dariusz Przybysz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.