How can I display the the columns in a view in vsql? The \d and \dv commands don't show the columns

Thanks
Moderator: NorbertKrupa
Code: Select all
daniel=> select export_objects('','view_name');
Code: Select all
daniel=> select ordinal_position, column_name, data_type from view_columns where table_name = 'view_name' order by ordinal_position;
Code: Select all
daniel=> \set show_view 'select ordinal_position, column_name, data_type from view_columns where table_name = '
daniel=> :show_view 'my_view';
ordinal_position | column_name | data_type
------------------+-------------+-------------
1 | id | int
2 | name | varchar(80)
3 | salary | int
4 | dept | int
(4 rows)