cockroachdb / cockroachdb/cockroach

pg_catalog: fix up `pg_catalog.pg_attribute`

Open
#123,706 0 comments 0 reactions 0 assignees View on GitHub
A-sql-pgcompat C-cleanup O-pg-regress T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

In postgres, the following query returns 0 rows:
```sql
-- Cross-check attnum against parent relation

SELECT a1.attrelid, a1.attname, c1.oid, c1.relname
FROM pg_attribute AS a1, pg_class AS c1
WHERE a1.attrelid = c1.oid AND a1.attnum > c1.relnatts;
```
while we receive a few hundred. We should fix it up (and adjust `pg_regress` roachtest accordingly).

Jira issue: CRDB-38492

Epic CRDB-60809

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.