Skip to content

Commit

Permalink
feat: fix missing column description in row desc for show columns com…
Browse files Browse the repository at this point in the history
…mand (#13116)
  • Loading branch information
yezizp2012 authored Oct 27, 2023
1 parent ae8f1b6 commit bc392aa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions e2e_test/ddl/show.slt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ table description t3 NULL volutpat vitae
query TTT
show columns from t3;
----
v1 integer false
v2 integer false
v3 integer false
_row_id serial true
v1 integer false turpis vehicula
v2 integer false Lorem ipsum dolor sit amet
v3 integer false NULL
_row_id serial true consectetur adipiscing elit

statement ok
create index idx1 on t3 (v1,v2);
Expand Down
8 changes: 4 additions & 4 deletions e2e_test/extended_mode/basic.slt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ table description t3 NULL NULL
query TTT
show columns from t3;
----
v1 integer false
v2 integer false
v3 integer false
_row_id serial true
v1 integer false NULL
v2 integer false NULL
v3 integer false NULL
_row_id serial true NULL

statement ok
drop table t3;
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/src/utils/infer_stmt_row_desc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ pub fn infer_show_object(objects: &ShowObject) -> Vec<PgFieldDescriptor> {
DataType::Varchar.to_oid(),
DataType::Varchar.type_len(),
),
PgFieldDescriptor::new(
"Description".to_owned(),
DataType::Varchar.to_oid(),
DataType::Varchar.type_len(),
),
],
ShowObject::Connection { .. } => vec![
PgFieldDescriptor::new(
Expand Down

0 comments on commit bc392aa

Please sign in to comment.