Skip to content

Commit

Permalink
Add the new support to virtual columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Silva committed Jan 5, 2023
1 parent 46b0a51 commit f0012c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/torque/postgresql/adapter/database_statements.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ def column_definitions(table_name)
query(<<-SQL, 'SCHEMA')
SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
c.collname, col_description(a.attrelid, a.attnum) AS comment,
#{supports_virtual_columns? ? 'attgenerated' : quote('')} as attgenerated
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
Expand Down

0 comments on commit f0012c8

Please sign in to comment.