Skip to content

Commit

Permalink
Use relation_max_name_length in postgres__make_relation_with_suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed Aug 11, 2022
1 parent f82cddb commit 84ced63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/postgres/dbt/include/postgres/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{% set suffix = suffix ~ dtstring %}
{% endif %}
{% set suffix_length = suffix|length %}
{% set relation_max_name_length = 63 %}
{% set relation_max_name_length = base_relation.relation_max_name_length() %}
{% if suffix_length > relation_max_name_length %}
{% do exceptions.raise_compiler_error('Relation suffix is too long (' ~ suffix_length ~ ' characters). Maximum length is ' ~ relation_max_name_length ~ ' characters.') %}
{% endif %}
Expand Down

0 comments on commit 84ced63

Please sign in to comment.