Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/pgt_completions/src/providers/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn complete_columns<'a>(ctx: &CompletionContext<'a>, builder: &mut Completio
description: format!("Table: {}.{}", col.schema_name, col.table_name),
kind: CompletionItemKind::Column,
completion_text: None,
detail: Some(col.type_name.to_string()),
detail: col.type_name.as_ref().map(|t| t.to_string()),
};

// autocomplete with the alias in a join clause if we find one
Expand Down
2 changes: 1 addition & 1 deletion crates/pgt_schema_cache/src/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct Column {

pub schema_name: String,
pub type_id: i64,
pub type_name: String,
pub type_name: Option<String>,
pub is_nullable: bool,

pub is_primary_key: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/pgt_schema_cache/src/queries/columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ from
left join pg_catalog.pg_type tps on tps.oid = atts.atttypid
where
-- system columns, such as `cmax` or `tableoid`, have negative `attnum`s
atts.attnum >= 0
atts.attnum >= 0 and atts.atttypid != null
order by
schema_name desc,
table_name,
Expand Down
Loading