timescale / timescaledb

An open-source time-series SQL database optimized for fast ingest and complex queries. Packaged as a PostgreSQL extension.
https://www.timescale.com/
Other
16.83k stars 852 forks source link

Add support for foreign keys to hypertables #6989

Closed svenklemm closed 2 weeks ago

svenklemm commented 1 month ago

Currrently we only allow Hypertables references other tables, with this patch the opposite direction is supported as well and tables can have foreign key references into hypertables.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 89.68254% with 26 lines in your changes missing coverage. Please review.

Project coverage is 81.73%. Comparing base (59f50f2) to head (79d7f33). Report is 212 commits behind head on main.

Files Patch % Lines
src/foreign_key.c 91.04% 10 Missing and 8 partials :warning:
src/process_utility.c 76.00% 1 Missing and 5 partials :warning:
src/hypertable.c 66.66% 0 Missing and 1 partial :warning:
src/planner/planner.c 95.23% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6989 +/- ## ========================================== + Coverage 80.06% 81.73% +1.66% ========================================== Files 190 200 +10 Lines 37181 37236 +55 Branches 9450 9717 +267 ========================================== + Hits 29770 30434 +664 + Misses 2997 2890 -107 + Partials 4414 3912 -502 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.