oid2name : add objects file path

From: David Bidoc <dcbidoc(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: oid2name : add objects file path
Date: 2025-10-07 08:55:14
Message-ID: CABour1v2CU1wjjoM86wAFyezJQ3-+ncH43zY1f1uXeVojVN8Ow@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

This is my first patch to the project.

I noticed that the oid2name tool does not display the file path of objects.

I thought this could be interesting and that others might find it useful,
so I made a little patch to display the full path of objects retrieved by
the oid2name tool. These will be displayed using the -x --extended option.

$ oid2name -p 5435 -x
All databases:
Oid Database Name Tablespace Filepath
----------------------------------------------
16392 b1 pg_default base/16392
5 postgres pg_default base/5
4 template0 pg_default base/4
1 template1 pg_default base/1

$ oid2name -p 5435 -d b1 -x
From database "b1":
Filenode Table Name Oid Schema Tablespace Filepath
-------------------------------------------------------------------
16393 t1 16393 public pg_default base/16392/16393

$ oid2name -p 5435 -d b1 -i -x
From database "b1":
Filenode Table Name Oid Schema Tablespace Filepath
-------------------------------------------------------------------
16393 t1 16393 public pg_default base/16392/16393
16396 t1_c1_idx 16396 public pg_default base/16392/16396

Regards

David Bidoc

Attachment Content-Type Size
oid2name_filepath.patch text/x-patch 2.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-10-07 09:08:02 Re: Remove custom redundant full page write description from GIN
Previous Message Michael Banck 2025-10-07 08:52:54 Re: GiST nitpicks I want to discuss (and maybe eventually fix)