oid2name: Why table and not relation? - Mailing list pgsql-general

From Daniel Westermann (DWE)
Subject oid2name: Why table and not relation?
Date
Msg-id ZR0P278MB0920EF1A9D63CE8D5D5B1AE5D2049@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM
Whole thread Raw
List pgsql-general
Hi,

given this simple example:

postgres=# create table t ( a int );
CREATE TABLE
postgres=# create index i on t(a);
CREATE INDEX
postgres=# select pg_relation_filepath('i');
 pg_relation_filepath
----------------------
 base/5/16388
(1 row)
postgres=# \! oid2name --oid 16388
From database "postgres":
  Filenode  Table Name
----------------------
     16388           i
postgres=#
postgres-# \! oid2name --table=i%
From database "postgres":
  Filenode  Table Name
----------------------
     16388           i
postgres-#

Is there a reason why the heading is called "Table Name" instead of "Relation Name"?

The same is true for the parameters:
postgres-# \! oid2name --help | grep -iw table
  -f, --filenode=FILENODE    show info for table with given file node
  -o, --oid=OID              show info for table with given OID
  -t, --table=TABLE          show info for named table

This works with indexes as well, not only tables.

Regards
Daniel


pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Couldn't cast to record[]
Next
From: hubert depesz lubaczewski
Date:
Subject: Interesting fail when migrating Pg from Ubuntu Bionic to Focal