Skip to content

Commit

Permalink
Modify postgres__get_columns_in_relation to use column name
Browse files Browse the repository at this point in the history
  • Loading branch information
benorourke committed Apr 25, 2023
1 parent 8f7548d commit 3156da4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plugins/postgres/dbt/include/postgres/macros/adapters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3156da4

Please sign in to comment.