Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/oid2name.sgml`
a6acb7a650eb9e357332222fec5c4f746e5ee45aa78bb5b70000000100000fa7
<!-- doc/src/sgml/oid2name.sgml -->

<refentry id="oid2name">
 <indexterm zone="oid2name">
  <primary>oid2name</primary>
 </indexterm>

 <refmeta>
  <refentrytitle>oid2name</refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>oid2name</refname>
  <refpurpose>resolve OIDs and file nodes in a <productname>PostgreSQL</productname> data directory</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>oid2name</command>
   <arg rep="repeat"><replaceable>option</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1>
  <title>Description</title>

 <para>
  <application>oid2name</application> is a utility program that helps administrators to
  examine the file structure used by PostgreSQL.  To make use of it, you need
  to be familiar with the database file structure, which is described in
  <xref linkend="storage"/>.
 </para>

 <note>
  <para>
   The name <quote>oid2name</quote> is historical, and is actually rather
   misleading, since most of the time when you use it, you will really
   be concerned with tables' filenode numbers (which are the file names
   visible in the database directories).  Be sure you understand the
   difference between table OIDs and table filenodes!
  </para>
 </note>

  <para>
   <application>oid2name</application> connects to a target database and
   extracts OID, filenode, and/or table name information.  You can also have
   it show database OIDs or tablespace OIDs.
  </para>

 </refsect1>

 <refsect1>
  <title>Options</title>

  <para>
   <application>oid2name</application> accepts the following command-line arguments:

   <variablelist>

    <varlistentry>
     <term><option>-f <replaceable class="parameter">filenode</replaceable></option></term>
     <term><option>--filenode=<replaceable class="parameter">filenode</replaceable></option></term>
     <listitem><para>show info for table with filenode <replaceable>filenode</replaceable>.</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-i</option></term>
     <term><option>--indexes</option></term>
     <listitem><para>include indexes and sequences in the listing.</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-o <replaceable class="parameter">oid</replaceable></option></term>
     <term><option>--oid=<replaceable class="parameter">oid</replaceable></option></term>
     <listitem><para>show info for table with OID <replaceable>oid</replaceable>.</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-q</option></term>
     <term><option>--quiet</option></term>
     <listitem><para>omit headers (useful for scripting).</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-s</option></term>
     <term><option>--tablespaces</option></term>
     <listitem><para>show tablespace OIDs.</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-S</option></term>
     <term><option>--system-objects</option></term>
     <listitem><para>include system objects (those in
      <option>information_schema</option>, <option>pg_toast</option>
      and <option>pg_catalog</option> schemas).
     </para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-t <replaceable class="parameter">tablename_pattern</replaceable></option></term>
     <term><option>--table=<replaceable class="parameter">tablename_pattern</replaceable></option></term>
     <listitem><para>show info for table(s) matching <replaceable class="parameter">tablename_pattern</replaceable>.</para></listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-V</option></term>
     <term><option>--version</option></term>
     <listitem>
      <para>
       Print the <application>oid2name</application> version and exit.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-x</option></term>
     <term><option>--extended</option></term>

Title: oid2name Utility Program
Summary
The oid2name utility program is used to resolve OIDs and file nodes in a PostgreSQL data directory, providing information about table OIDs, filenodes, and table names, as well as database OIDs and tablespace OIDs, with various command-line options available to customize its behavior.