Show oid2name command-line arguments in documentation like we do for

non-contrib command-line tools (no longer in a single table display).
This commit is contained in:
Bruce Momjian 2010-05-20 03:45:38 +00:00
parent 9974a46004
commit 47671aae77

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/oid2name.sgml,v 1.6 2010/05/19 20:22:05 momjian Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/oid2name.sgml,v 1.7 2010/05/20 03:45:38 momjian Exp $ -->
<sect1 id="oid2name"> <sect1 id="oid2name">
<title>oid2name</title> <title>oid2name</title>
@ -30,119 +30,116 @@
<para> <para>
<application>oid2name</application> connects to a target database and <application>oid2name</application> connects to a target database and
extracts OID, filenode, and/or table name information. You can also have extracts OID, filenode, and/or table name information. You can also have
it show database OIDs or tablespace OIDs. The program is controlled by it show database OIDs or tablespace OIDs.
a large number of command-line options, as shown in
<xref linkend="oid2name-options">.
</para> </para>
<table id="oid2name-options"> </sect2>
<title><application>oid2name</> options</title>
<tgroup cols="2">
<thead>
<row>
<entry>Option</entry>
<entry>Description</entry>
</row>
</thead>
<tbody> <sect2>
<row> <title><application>oid2name</> options</title>
<entry><literal>-o</literal> <replaceable>oid</></entry>
<entry>show info for table with OID <replaceable>oid</></entry>
</row>
<row> <para>
<entry><literal>-f</literal> <replaceable>filenode</></entry> <application>oid2name</application> accepts the following command-line arguments:
<entry>show info for table with filenode <replaceable>filenode</></entry>
</row>
<row> <variablelist>
<entry><literal>-t</literal> <replaceable>tablename_pattern</></entry>
<entry>show info for table(s) matching <replaceable>tablename_pattern</></entry>
</row>
<row> <varlistentry>
<entry><literal>-s</literal></entry> <term><option>-o</option> <replaceable>oid</></term>
<entry>show tablespace OIDs</entry> <listitem><para>show info for table with OID <replaceable>oid</></para></listitem>
</row> </varlistentry>
<row> <varlistentry>
<entry><literal>-S</literal></entry> <term><option>-f</option> <replaceable>filenode</></term>
<entry>include system objects (those in <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem>
<literal>information_schema</literal>, <literal>pg_toast</literal> </varlistentry>
and <literal>pg_catalog</literal> schemas)
</entry>
</row>
<row> <varlistentry>
<entry><literal>-i</literal></entry> <term><option>-t</option> <replaceable>tablename_pattern</></term>
<entry>include indexes and sequences in the listing</entry> <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem>
</row> </varlistentry>
<row> <varlistentry>
<entry><literal>-x</literal></entry> <term><option>-s</option></term>
<entry>display more information about each object shown: tablespace name, <listitem><para>show tablespace OIDs</para></listitem>
schema name, and OID </varlistentry>
</entry>
</row>
<row> <varlistentry>
<entry><literal>-q</literal></entry> <term><option>-S</option></term>
<entry>omit headers (useful for scripting)</entry> <listitem><para>include system objects (those in
</row> <option>information_schema</option>, <option>pg_toast</option>
and <option>pg_catalog</option> schemas)
</para></listitem>
</varlistentry>
<row> <varlistentry>
<entry><literal>-d</literal> <replaceable>database</></entry> <term><option>-i</option></term>
<entry>database to connect to</entry> <listitem><para>include indexes and sequences in the listing</para></listitem>
</row> </varlistentry>
<row> <varlistentry>
<entry><literal>-H</literal> <replaceable>host</></entry> <term><option>-x</option></term>
<entry>database server's host</entry> <listitem><para>display more information about each object shown: tablespace name,
</row> schema name, and OID
</para></listitem>
</varlistentry>
<row> <varlistentry>
<entry><literal>-p</literal> <replaceable>port</></entry> <term><option>-q</option></term>
<entry>database server's port</entry> <listitem><para>omit headers (useful for scripting)</para></listitem>
</row> </varlistentry>
<row> <varlistentry>
<entry><literal>-U</literal> <replaceable>username</></entry> <term><option>-d</option> <replaceable>database</></term>
<entry>username to connect as</entry> <listitem><para>database to connect to</para></listitem>
</row> </varlistentry>
<row> <varlistentry>
<entry><literal>-P</literal> <replaceable>password</></entry> <term><option>-H</option> <replaceable>host</></term>
<entry>password (deprecated &mdash; putting this on the command line <listitem><para>database server's host</para></listitem>
is a security hazard)</entry> </varlistentry>
</row>
</tbody> <varlistentry>
</tgroup> <term><option>-p</option> <replaceable>port</></term>
</table> <listitem><para>database server's port</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-U</option> <replaceable>username</></term>
<listitem><para>username to connect as</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option> <replaceable>password</></term>
<listitem><para>password (deprecated &mdash; putting this on the command line
is a security hazard)</para></listitem>
</varlistentry>
</variablelist>
</para>
<para> <para>
To display specific tables, select which tables to show by To display specific tables, select which tables to show by
using <literal>-o</>, <literal>-f</> and/or <literal>-t</>. using <option>-o</>, <option>-f</> and/or <option>-t</>.
<literal>-o</> takes an OID, <option>-o</> takes an OID,
<literal>-f</> takes a filenode, <option>-f</> takes a filenode,
and <literal>-t</> takes a tablename (actually, it's a LIKE and <option>-t</> takes a tablename (actually, it's a LIKE
pattern, so you can use things like <literal>foo%</>). pattern, so you can use things like <option>foo%</>).
You can use as many You can use as many
of these options as you like, and the listing will include all objects of these options as you like, and the listing will include all objects
matched by any of the options. But note that these options can only matched by any of the options. But note that these options can only
show objects in the database given by <literal>-d</>. show objects in the database given by <option>-d</>.
</para> </para>
<para> <para>
If you don't give any of <literal>-o</>, <literal>-f</> or <literal>-t</>, If you don't give any of <option>-o</>, <option>-f</> or <option>-t</>,
but do give <literal>-d</>, it will list all tables in the database but do give <option>-d</>, it will list all tables in the database
named by <literal>-d</>. In this mode, the <literal>-S</> and named by <option>-d</>. In this mode, the <option>-S</> and
<literal>-i</> options control what gets listed. <option>-i</> options control what gets listed.
</para> </para>
<para> <para>
If you don't give <literal>-d</> either, it will show a listing of database If you don't give <option>-d</> either, it will show a listing of database
OIDs. Alternatively you can give <literal>-s</> to get a tablespace OIDs. Alternatively you can give <option>-s</> to get a tablespace
listing. listing.
</para> </para>
</sect2> </sect2>