dbt-labs / dbt-postgres

Apache License 2.0
31 stars 12 forks source link

Fix the semicolon semantics for indexes while respecting other bug fix. #97

Closed VersusFacit closed 5 months ago

VersusFacit commented 5 months ago

resolves #85 docs dbt-labs/docs.getdbt.com/#

Problem

image

Reprex now added as test and replicated locally!

@mikealfare shared this lovely context, re the comment linked in the issue ticket (here). We removed a ; at the postgres__get_create_index_sql macro to solve a different problem sending up empty queries when getting this merged:

We do not appear to be updating cache for MV functionality like drops, renames, adds which is causing catalog mismatch errors in runs especially between MV's that are dependent on each other

This however was incomplete as a solution because we needed to only leave off the last ; from various index create/alter statements.

Solution

image

Checklist

jtcohen6 commented 5 months ago

FYI @VersusFacit - We need to backport this fix for inclusion in v1.7.x + v1.8.x, because this was a regression introduced in v1.7.14. I don't believe we have the backport workflow set up in this repo yet, so we either need to backport manually or set up that workflow.