oid2name: Why table and not relation?

From: "Daniel Westermann (DWE)" <daniel(dot)westermann(at)dbi-services(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: oid2name: Why table and not relation?
Date: 2022-03-03 14:26:49
Message-ID: ZR0P278MB0920EF1A9D63CE8D5D5B1AE5D2049@ZR0P278MB0920.CHEP278.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2022-03-03 15:04:28 Interesting fail when migrating Pg from Ubuntu Bionic to Focal
Previous Message Pavel Stehule 2022-03-03 10:16:36 Re: Couldn't cast to record[]