-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: pg_attribute does not report stored columns on indexes #88107
Copy link
Copy link
Closed
Labels
A-sql-pgcatalogA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-vtablesVirtual tables - pg_catalog, information_schema etcVirtual tables - pg_catalog, information_schema etcC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Description
Needed for #88061
Describe the problem
CockroachDB does not include stored columns in pg_attribute
To Reproduce
Initialize with:
create table mytable(x int, y int);
create index myidx on mytable(x) include(y);Then run \d myidx using psql, on both PostgreSQL and CockroachDb.
In pg, the (correct) output is:
Index "public.myidx"
Column | Type | Key? | Definition
--------+---------+------+------------
x | integer | yes | x
y | integer | no | y
In CockroachDB:
Column | Type | Key? | Definition
---------+--------+------+-------------
x | bigint | yes | x
Notice how y is not listed.
Jira issue: CRDB-19691
Epic: CRDB-23454
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-pgcatalogA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-vtablesVirtual tables - pg_catalog, information_schema etcVirtual tables - pg_catalog, information_schema etcC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)SQL Foundations Team (formerly SQL Schema + SQL Sessions)