puppetlabs / puppetdb

Centralized Puppet Storage
http://docs.puppetlabs.com/puppetdb
Apache License 2.0
298 stars 224 forks source link

(PDB-5743) Fix join-deps for latest_report_status #3967

Closed austb closed 4 months ago

austb commented 4 months ago

Without another reference to a field that depends on the certnames table, a query for latest_report_status will fail with the error.

ERROR: missing FROM-clause entry for table "certnames"

latest_report_status needs the certnames table in order to know the latest_report_id that it needs to join against the reports table.

Fixes #3966