Commit 47671aae authored by Bruce Momjian's avatar Bruce Momjian

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

non-contrib command-line tools (no longer in a single table display).
parent 9974a460
<!-- $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 @@ ...@@ -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"> <sect2>
<thead> <title><application>oid2name</> options</title>
<row>
<entry>Option</entry> <para>
<entry>Description</entry> <application>oid2name</application> accepts the following command-line arguments:
</row>
</thead> <variablelist>
<tbody> <varlistentry>
<row> <term><option>-o</option> <replaceable>oid</></term>
<entry><literal>-o</literal> <replaceable>oid</></entry> <listitem><para>show info for table with OID <replaceable>oid</></para></listitem>
<entry>show info for table with OID <replaceable>oid</></entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-f</option> <replaceable>filenode</></term>
<entry><literal>-f</literal> <replaceable>filenode</></entry> <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem>
<entry>show info for table with filenode <replaceable>filenode</></entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-t</option> <replaceable>tablename_pattern</></term>
<entry><literal>-t</literal> <replaceable>tablename_pattern</></entry> <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem>
<entry>show info for table(s) matching <replaceable>tablename_pattern</></entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-s</option></term>
<entry><literal>-s</literal></entry> <listitem><para>show tablespace OIDs</para></listitem>
<entry>show tablespace OIDs</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-S</option></term>
<entry><literal>-S</literal></entry> <listitem><para>include system objects (those in
<entry>include system objects (those in <option>information_schema</option>, <option>pg_toast</option>
<literal>information_schema</literal>, <literal>pg_toast</literal> and <option>pg_catalog</option> schemas)
and <literal>pg_catalog</literal> schemas) </para></listitem>
</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-i</option></term>
<entry><literal>-i</literal></entry> <listitem><para>include indexes and sequences in the listing</para></listitem>
<entry>include indexes and sequences in the listing</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-x</option></term>
<entry><literal>-x</literal></entry> <listitem><para>display more information about each object shown: tablespace name,
<entry>display more information about each object shown: tablespace name, schema name, and OID
schema name, and OID </para></listitem>
</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-q</option></term>
<entry><literal>-q</literal></entry> <listitem><para>omit headers (useful for scripting)</para></listitem>
<entry>omit headers (useful for scripting)</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-d</option> <replaceable>database</></term>
<entry><literal>-d</literal> <replaceable>database</></entry> <listitem><para>database to connect to</para></listitem>
<entry>database to connect to</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-H</option> <replaceable>host</></term>
<entry><literal>-H</literal> <replaceable>host</></entry> <listitem><para>database server's host</para></listitem>
<entry>database server's host</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-p</option> <replaceable>port</></term>
<entry><literal>-p</literal> <replaceable>port</></entry> <listitem><para>database server's port</para></listitem>
<entry>database server's port</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-U</option> <replaceable>username</></term>
<entry><literal>-U</literal> <replaceable>username</></entry> <listitem><para>username to connect as</para></listitem>
<entry>username to connect as</entry> </varlistentry>
</row>
<varlistentry>
<row> <term><option>-P</option> <replaceable>password</></term>
<entry><literal>-P</literal> <replaceable>password</></entry> <listitem><para>password (deprecated &mdash; putting this on the command line
<entry>password (deprecated &mdash; putting this on the command line is a security hazard)</para></listitem>
is a security hazard)</entry> </varlistentry>
</row>
</tbody> </variablelist>
</tgroup> </para>
</table>
<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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment