microsoft / microsoft/vscode-mssql
[Bug]: Object Explorer displays user-defined and XML column types without key details
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
Description
Object Explorer can display column data types inconsistently and miss information for tables that include user-defined alias types and XML columns.
SSMS
Vscode-mssql
In the Azure Data Studio report this was observed on `SalesLT.ProductModel`, where the ADS Object Explorer display was less usable than SSMS for the same table. The likely issues were missing or incomplete type detail for alias-based types and XML columns.
Related Azure Data Studio issue:
https://github.com/microsoft/azuredatastudio/issues/11834
Steps to Reproduce
1. Connect to a SQL Server database.
2. Run the following setup script:
```sql
CREATE DATABASE Repro11834;
GO
USE Repro11834;
GO
CREATE SCHEMA SalesLT;
GO
CREATE TYPE dbo.Name FROM NVARCHAR(50) NOT NULL;
GO
CREATE XML SCHEMA COLLECTION dbo.ProductModelXmlSchema AS N'
';
GO
CREATE TABLE SalesLT.ProductModel
(
ProductModelID int IDENTITY(1,1) NOT NULL PRIMARY KEY,
Name dbo.Name NOT NULL,
CatalogDescription xml(DOCUMENT dbo.ProductModelXmlSchema) NULL,
Instructions xml NULL,
ModifiedDate datetime2 NOT NULL DEFAULT sysdatetime()
);
GO
```
3. In Object Explorer, navigate to `Databases > Repro11834 > Tables > SalesLT.ProductModel > Columns`.
4. Inspect how Object Explorer displays the `Name`, `CatalogDescription`, and `Instructions` column types.
Expected Behavior
Object Explorer should display type information consistently and usefully for:
- alias/user-defined types such as `dbo.Name` based on `nvarchar(50)`
- typed XML columns
- untyped XML columns
The display should make it clear what the declared type is and should not omit important information that users rely on when browsing schema metadata.
Actual Behavior
Object Explorer displays user-defined and XML column types inconsistently, making the result less usable than SSMS for the same table definition.
Affected Area
- Object Explorer
Environment Information
- VS Code Version:
- MSSQL Extension Version:
- Operating System:
- SQL Server target/version:
Confirmation
- I have searched existing issues and couldn't find a match
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the supplied SQL Server setup script and inspecting the Object Explorer Columns view for dbo.Name, CatalogDescription, and Instructions. Trace how column metadata is retrieved and rendered, then verify that alias/user-defined, typed XML, and untyped XML columns show complete and consistent declared type information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql, typescript
- Domain
- databases, developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100