cockroachdb / cockroachdb/cockroach

pg_catalog: fix up `pg_catalog.pg_am` table

Open
#123,705 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
-- Tables, matviews etc should have AMs of type 't'
SELECT pc.oid, pc.relname, pa.amname, pa.amtype
FROM pg_class as pc JOIN pg_am AS pa ON (pc.relam = pa.oid)
WHERE pc.relkind IN ('r', 't', 'm') and
pa.amtype != 't';
```
while we receive a few hundred. We should fix it up (and adjust `pg_regress` roachtest accordingly).

Jira issue: CRDB-38491

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.