From 3156da4245772f6411d057bd8d66edb04d9ed2c0 Mon Sep 17 00:00:00 2001 From: ben-seedlegals <44807875+benorourke@users.noreply.github.com> Date: Tue, 25 Apr 2023 16:51:20 +0100 Subject: [PATCH] Modify postgres__get_columns_in_relation to use column name --- plugins/postgres/dbt/include/postgres/macros/adapters.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/postgres/dbt/include/postgres/macros/adapters.sql b/plugins/postgres/dbt/include/postgres/macros/adapters.sql index 0b22cd71186..f09efaac2cb 100644 --- a/plugins/postgres/dbt/include/postgres/macros/adapters.sql +++ b/plugins/postgres/dbt/include/postgres/macros/adapters.sql @@ -59,10 +59,7 @@ {% macro postgres__get_columns_in_relation(relation) -%} {% call statement('get_columns_in_relation', fetch_result=True) %} select - case - when (data_type = 'USER-DEFINED') then udt_name - else column_name - end as column_name, + column_name, case when (data_type = 'USER-DEFINED') then concat(udt_schema || '.' || udt_name) else data_type