Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2343] [Bug] snapshot with custom datatypes breaks when source table is regenerated #7459

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20230425-155445.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: '[CT-2343] [Bug] snapshot with custom datatypes breaks when source table is
regenerated'
time: 2023-04-25T15:54:45.1782743+01:00
custom:
Author: benorourke
Issue: "7248"
5 changes: 4 additions & 1 deletion plugins/postgres/dbt/include/postgres/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
{% call statement('get_columns_in_relation', fetch_result=True) %}
select
column_name,
data_type,
case
when (data_type = 'USER-DEFINED') then concat(udt_schema || '.' || udt_name)
else data_type
end as data_type,
character_maximum_length,
numeric_precision,
numeric_scale
Expand Down