Relative Content

Tag Archive for postgresqlazure-functionsinsertforeign-keystimescaledb

Foreign key constraint violation for referencing timescale postgres table

I have postgres timescale table that stores sensor measures. The table has composite primary key with the id int incremental column and the dateTime column(it was required to be composite in oreder to make the table a hypertable), also I have warnings table that has foreign key to the sensor measures table that is also composite but when I try to insert in the warnings table it gives me foreign key constraint error that does not exist in the sensor measures table, but I checked and that composite primary key exists.