aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2013-07-19 03:50:20 +0900
committerFujii Masao <fujii@postgresql.org>2013-07-19 03:50:20 +0900
commit1dc118660b8f12d3bdec94b6f6e1068966ca62e9 (patch)
tree31e7020fa5e551a9021adeea575d626f0bc4ae70 /doc/src
parentd26888bc4d1e539a82f21382b0000fe5bbf889d9 (diff)
downloadpostgresql-1dc118660b8f12d3bdec94b6f6e1068966ca62e9.tar.gz
postgresql-1dc118660b8f12d3bdec94b6f6e1068966ca62e9.zip
Fix pgstattuple functions to use regclass-type as the argument.
This allows us to specify the target relation with several expressions, 'relname', 'schemaname.relname' and OID in all pgstattuple functions. pgstatindex() and pg_relpages() could not accept OID as the argument so far. Per discussion on -hackers, we decided to keep two types of interfaces, with regclass-type and TEXT-type argument, for each pgstattuple function because of the backward-compatibility issue. The functions which have TEXT-type argument will be deprecated in the future release. Patch by Satoshi Nagayasu, reviewed by Rushabh Lathia and Fujii Masao.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/pgstattuple.sgml47
1 files changed, 40 insertions, 7 deletions
diff --git a/doc/src/sgml/pgstattuple.sgml b/doc/src/sgml/pgstattuple.sgml
index f2bc2a68f88..6cae04a9c8b 100644
--- a/doc/src/sgml/pgstattuple.sgml
+++ b/doc/src/sgml/pgstattuple.sgml
@@ -22,7 +22,7 @@
</indexterm>
<term>
- <function>pgstattuple(text) returns record</>
+ <function>pgstattuple(regclass) returns record</>
</term>
<listitem>
@@ -30,7 +30,7 @@
<function>pgstattuple</function> returns a relation's physical length,
percentage of <quote>dead</> tuples, and other info. This may help users
to determine whether vacuum is necessary or not. The argument is the
- target relation's name (optionally schema-qualified).
+ target relation's name (optionally schema-qualified) or OID.
For example:
<programlisting>
test=> SELECT * FROM pgstattuple('pg_catalog.pg_proc');
@@ -125,13 +125,15 @@ free_percent | 1.95
<varlistentry>
<term>
- <function>pgstattuple(oid) returns record</>
+ <function>pgstattuple(text) returns record</>
</term>
<listitem>
<para>
- This is the same as <function>pgstattuple(text)</function>, except
- that the target relation is specified by OID.
+ This is the same as <function>pgstattuple(regclass)</function>, except
+ that the target relation is specified by TEXT. This function is kept
+ because of backward-compatibility so far, and will be deprecated in
+ the future release.
</para>
</listitem>
</varlistentry>
@@ -141,7 +143,7 @@ free_percent | 1.95
<indexterm>
<primary>pgstatindex</primary>
</indexterm>
- <function>pgstatindex(text) returns record</>
+ <function>pgstatindex(regclass) returns record</>
</term>
<listitem>
@@ -253,6 +255,21 @@ leaf_fragmentation | 0
<varlistentry>
<term>
+ <function>pgstatindex(text) returns record</>
+ </term>
+
+ <listitem>
+ <para>
+ This is the same as <function>pgstatindex(regclass)</function>, except
+ that the target index is specified by TEXT. This function is kept
+ because of backward-compatibility so far, and will be deprecated in
+ the future release.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
<indexterm>
<primary>pgstatginindex</primary>
</indexterm>
@@ -316,7 +333,7 @@ pending_tuples | 0
<indexterm>
<primary>pg_relpages</primary>
</indexterm>
- <function>pg_relpages(text) returns bigint</>
+ <function>pg_relpages(regclass) returns bigint</>
</term>
<listitem>
@@ -326,6 +343,22 @@ pending_tuples | 0
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>
+ <function>pg_relpages(text) returns bigint</>
+ </term>
+
+ <listitem>
+ <para>
+ This is the same as <function>pg_relpages(regclass)</function>, except
+ that the target relation is specified by TEXT. This function is kept
+ because of backward-compatibility so far, and will be deprecated in
+ the future release.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</sect2>