cockroachdb / cockroachdb/cockroach
pg_catalog: fix up `pg_catalog.pg_attribute`
Open
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
Assessment
This issue has not been assessed yet.