Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: fixing information_schema.columns.is_identity #61348

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 8 additions & 7 deletions pkg/sql/information_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,14 @@ https://www.postgresql.org/docs/9.5/infoschema-columns.html`,
dbNameStr, // udt_catalog
udtSchema, // udt_schema
tree.NewDString(column.GetType().PGName()), // udt_name
tree.DNull, // scope_catalog
tree.DNull, // scope_schema
tree.DNull, // scope_name
tree.DNull, // maximum_cardinality
tree.DNull, // dtd_identifier
tree.DNull, // is_self_referencing
tree.DNull, // is_identity
tree.DNull, // scope_catalog
tree.DNull, // scope_schema
tree.DNull, // scope_name
tree.DNull, // maximum_cardinality
tree.DNull, // dtd_identifier
tree.DNull, // is_self_referencing
//TODO: Need to update when supporting identiy columns (Issue #48532)
noString, // is_identity
tree.DNull, // identity_generation
tree.DNull, // identity_start
tree.DNull, // identity_increment
Expand Down
10 changes: 10 additions & 0 deletions pkg/sql/logictest/testdata/logic_test/information_schema
Original file line number Diff line number Diff line change
Expand Up @@ -4301,3 +4301,13 @@ udt_schema udt_name
sh d
public e
pg_catalog int8

# Testing information_schema.columns.is_identity which for now is False for every column
statement ok
SET DATABASE = "";

query T colnames
SELECT distinct is_identity FROM information_schema.columns
----
is_identity
NO