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