|
1 | | -<!-- $PostgreSQL: pgsql/doc/src/sgml/oid2name.sgml,v 1.6 2010/05/19 20:22:05 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/oid2name.sgml,v 1.7 2010/05/20 03:45:38 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <sect1 id="oid2name"> |
4 | 4 | <title>oid2name</title> |
|
30 | 30 | <para> |
31 | 31 | <application>oid2name</application> connects to a target database and |
32 | 32 | extracts OID, filenode, and/or table name information. You can also have |
33 | | - it show database OIDs or tablespace OIDs. The program is controlled by |
34 | | - a large number of command-line options, as shown in |
35 | | - <xref linkend="oid2name-options">. |
| 33 | + it show database OIDs or tablespace OIDs. |
36 | 34 | </para> |
37 | 35 |
|
38 | | - <table id="oid2name-options"> |
39 | | - <title><application>oid2name</> options</title> |
40 | | - <tgroup cols="2"> |
41 | | - <thead> |
42 | | - <row> |
43 | | - <entry>Option</entry> |
44 | | - <entry>Description</entry> |
45 | | - </row> |
46 | | - </thead> |
47 | | - |
48 | | - <tbody> |
49 | | - <row> |
50 | | - <entry><literal>-o</literal> <replaceable>oid</></entry> |
51 | | - <entry>show info for table with OID <replaceable>oid</></entry> |
52 | | - </row> |
53 | | - |
54 | | - <row> |
55 | | - <entry><literal>-f</literal> <replaceable>filenode</></entry> |
56 | | - <entry>show info for table with filenode <replaceable>filenode</></entry> |
57 | | - </row> |
58 | | - |
59 | | - <row> |
60 | | - <entry><literal>-t</literal> <replaceable>tablename_pattern</></entry> |
61 | | - <entry>show info for table(s) matching <replaceable>tablename_pattern</></entry> |
62 | | - </row> |
63 | | - |
64 | | - <row> |
65 | | - <entry><literal>-s</literal></entry> |
66 | | - <entry>show tablespace OIDs</entry> |
67 | | - </row> |
68 | | - |
69 | | - <row> |
70 | | - <entry><literal>-S</literal></entry> |
71 | | - <entry>include system objects (those in |
72 | | - <literal>information_schema</literal>, <literal>pg_toast</literal> |
73 | | - and <literal>pg_catalog</literal> schemas) |
74 | | - </entry> |
75 | | - </row> |
76 | | - |
77 | | - <row> |
78 | | - <entry><literal>-i</literal></entry> |
79 | | - <entry>include indexes and sequences in the listing</entry> |
80 | | - </row> |
81 | | - |
82 | | - <row> |
83 | | - <entry><literal>-x</literal></entry> |
84 | | - <entry>display more information about each object shown: tablespace name, |
85 | | - schema name, and OID |
86 | | - </entry> |
87 | | - </row> |
88 | | - |
89 | | - <row> |
90 | | - <entry><literal>-q</literal></entry> |
91 | | - <entry>omit headers (useful for scripting)</entry> |
92 | | - </row> |
93 | | - |
94 | | - <row> |
95 | | - <entry><literal>-d</literal> <replaceable>database</></entry> |
96 | | - <entry>database to connect to</entry> |
97 | | - </row> |
98 | | - |
99 | | - <row> |
100 | | - <entry><literal>-H</literal> <replaceable>host</></entry> |
101 | | - <entry>database server's host</entry> |
102 | | - </row> |
103 | | - |
104 | | - <row> |
105 | | - <entry><literal>-p</literal> <replaceable>port</></entry> |
106 | | - <entry>database server's port</entry> |
107 | | - </row> |
108 | | - |
109 | | - <row> |
110 | | - <entry><literal>-U</literal> <replaceable>username</></entry> |
111 | | - <entry>username to connect as</entry> |
112 | | - </row> |
113 | | - |
114 | | - <row> |
115 | | - <entry><literal>-P</literal> <replaceable>password</></entry> |
116 | | - <entry>password (deprecated — putting this on the command line |
117 | | - is a security hazard)</entry> |
118 | | - </row> |
119 | | - </tbody> |
120 | | - </tgroup> |
121 | | - </table> |
| 36 | + </sect2> |
| 37 | + |
| 38 | + <sect2> |
| 39 | + <title><application>oid2name</> options</title> |
| 40 | + |
| 41 | + <para> |
| 42 | + <application>oid2name</application> accepts the following command-line arguments: |
| 43 | + |
| 44 | + <variablelist> |
| 45 | + |
| 46 | + <varlistentry> |
| 47 | + <term><option>-o</option> <replaceable>oid</></term> |
| 48 | + <listitem><para>show info for table with OID <replaceable>oid</></para></listitem> |
| 49 | + </varlistentry> |
| 50 | + |
| 51 | + <varlistentry> |
| 52 | + <term><option>-f</option> <replaceable>filenode</></term> |
| 53 | + <listitem><para>show info for table with filenode <replaceable>filenode</></para></listitem> |
| 54 | + </varlistentry> |
| 55 | + |
| 56 | + <varlistentry> |
| 57 | + <term><option>-t</option> <replaceable>tablename_pattern</></term> |
| 58 | + <listitem><para>show info for table(s) matching <replaceable>tablename_pattern</></para></listitem> |
| 59 | + </varlistentry> |
| 60 | + |
| 61 | + <varlistentry> |
| 62 | + <term><option>-s</option></term> |
| 63 | + <listitem><para>show tablespace OIDs</para></listitem> |
| 64 | + </varlistentry> |
| 65 | + |
| 66 | + <varlistentry> |
| 67 | + <term><option>-S</option></term> |
| 68 | + <listitem><para>include system objects (those in |
| 69 | + <option>information_schema</option>, <option>pg_toast</option> |
| 70 | + and <option>pg_catalog</option> schemas) |
| 71 | + </para></listitem> |
| 72 | + </varlistentry> |
| 73 | + |
| 74 | + <varlistentry> |
| 75 | + <term><option>-i</option></term> |
| 76 | + <listitem><para>include indexes and sequences in the listing</para></listitem> |
| 77 | + </varlistentry> |
| 78 | + |
| 79 | + <varlistentry> |
| 80 | + <term><option>-x</option></term> |
| 81 | + <listitem><para>display more information about each object shown: tablespace name, |
| 82 | + schema name, and OID |
| 83 | + </para></listitem> |
| 84 | + </varlistentry> |
| 85 | + |
| 86 | + <varlistentry> |
| 87 | + <term><option>-q</option></term> |
| 88 | + <listitem><para>omit headers (useful for scripting)</para></listitem> |
| 89 | + </varlistentry> |
| 90 | + |
| 91 | + <varlistentry> |
| 92 | + <term><option>-d</option> <replaceable>database</></term> |
| 93 | + <listitem><para>database to connect to</para></listitem> |
| 94 | + </varlistentry> |
| 95 | + |
| 96 | + <varlistentry> |
| 97 | + <term><option>-H</option> <replaceable>host</></term> |
| 98 | + <listitem><para>database server's host</para></listitem> |
| 99 | + </varlistentry> |
| 100 | + |
| 101 | + <varlistentry> |
| 102 | + <term><option>-p</option> <replaceable>port</></term> |
| 103 | + <listitem><para>database server's port</para></listitem> |
| 104 | + </varlistentry> |
| 105 | + |
| 106 | + <varlistentry> |
| 107 | + <term><option>-U</option> <replaceable>username</></term> |
| 108 | + <listitem><para>username to connect as</para></listitem> |
| 109 | + </varlistentry> |
| 110 | + |
| 111 | + <varlistentry> |
| 112 | + <term><option>-P</option> <replaceable>password</></term> |
| 113 | + <listitem><para>password (deprecated — putting this on the command line |
| 114 | + is a security hazard)</para></listitem> |
| 115 | + </varlistentry> |
| 116 | + |
| 117 | + </variablelist> |
| 118 | + </para> |
122 | 119 |
|
123 | 120 | <para> |
124 | 121 | To display specific tables, select which tables to show by |
125 | | - using <literal>-o</>, <literal>-f</> and/or <literal>-t</>. |
126 | | - <literal>-o</> takes an OID, |
127 | | - <literal>-f</> takes a filenode, |
128 | | - and <literal>-t</> takes a tablename (actually, it's a LIKE |
129 | | - pattern, so you can use things like <literal>foo%</>). |
| 122 | + using <option>-o</>, <option>-f</> and/or <option>-t</>. |
| 123 | + <option>-o</> takes an OID, |
| 124 | + <option>-f</> takes a filenode, |
| 125 | + and <option>-t</> takes a tablename (actually, it's a LIKE |
| 126 | + pattern, so you can use things like <option>foo%</>). |
130 | 127 | You can use as many |
131 | 128 | of these options as you like, and the listing will include all objects |
132 | 129 | matched by any of the options. But note that these options can only |
133 | | - show objects in the database given by <literal>-d</>. |
| 130 | + show objects in the database given by <option>-d</>. |
134 | 131 | </para> |
135 | 132 |
|
136 | 133 | <para> |
137 | | - If you don't give any of <literal>-o</>, <literal>-f</> or <literal>-t</>, |
138 | | - but do give <literal>-d</>, it will list all tables in the database |
139 | | - named by <literal>-d</>. In this mode, the <literal>-S</> and |
140 | | - <literal>-i</> options control what gets listed. |
| 134 | + If you don't give any of <option>-o</>, <option>-f</> or <option>-t</>, |
| 135 | + but do give <option>-d</>, it will list all tables in the database |
| 136 | + named by <option>-d</>. In this mode, the <option>-S</> and |
| 137 | + <option>-i</> options control what gets listed. |
141 | 138 | </para> |
142 | 139 |
|
143 | 140 | <para> |
144 | | - If you don't give <literal>-d</> either, it will show a listing of database |
145 | | - OIDs. Alternatively you can give <literal>-s</> to get a tablespace |
| 141 | + If you don't give <option>-d</> either, it will show a listing of database |
| 142 | + OIDs. Alternatively you can give <option>-s</> to get a tablespace |
146 | 143 | listing. |
147 | 144 | </para> |
148 | 145 | </sect2> |
|