Re: maybe a type_sanity. sql bug - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: maybe a type_sanity. sql bug
Date
Msg-id ZU7NHWIahU4NQcK9@paquier.xyz
Whole thread Raw
In response to Re: maybe a type_sanity. sql bug  (jian he <jian.universality@gmail.com>)
Responses Re: maybe a type_sanity. sql bug
List pgsql-hackers
On Sat, Nov 11, 2023 at 08:00:00AM +0800, jian he wrote:
> I am not sure the pg_class "relam" description part is correct. since
> partitioned indexes (relkind "I") also have the access method, but no
> storage.
> "
> If this is a table or an index, the access method used (heap, B-tree,
> hash, etc.); otherwise zero (zero occurs for sequences, as well as
> relations without storage, such as views)
> "

This should be adjusted as well in the docs, IMO.  I would propose
something slightly more complicated:
"
If this is a table, index, materialized view or partitioned index, the
access method used (heap, B-tree, hash, etc.); otherwise zero (zero
occurs for sequences, as well as relations without storage, like
views).
"

> diff --git a/src/test/regress/sql/type_sanity.sql b/src/test/regress/sql/type_sanity.sql
> index a546ba89..6d806941 100644
> --- a/src/test/regress/sql/type_sanity.sql
> +++ b/src/test/regress/sql/type_sanity.sql

Ahah, nice catches.  I'll go adjust that on HEAD like the other one
you pointed out.  Just note that materialized views have a relam
defined, so the first comment you have changed is not completely
correct.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: A recent message added to pg_upgade
Next
From: Andres Freund
Date:
Subject: Re: Why do indexes and sorts use the database collation?