Re: pg_tablespace_databases - Mailing list pgsql-patches

From Andreas Pflug
Subject Re: pg_tablespace_databases
Date
Msg-id 40E45A98.4030608@pse-consulting.de
Whole thread Raw
In response to pg_tablespace_databases  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgsql-patches
Joe Conway wrote:

>
> If there are no objections, I'll review and apply this tonight (west
> coast USA time).
>
> Andreas, please provide a corresponding documentation patch.
>
Here we are.
Since I don't have a SGML build environment, syntax is not checked.

Regards,
Andreas

Index: func.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/func.sgml,v
retrieving revision 1.211
diff -u -r1.211 func.sgml
--- func.sgml    25 Jun 2004 17:20:21 -0000    1.211
+++ func.sgml    1 Jul 2004 18:38:34 -0000
@@ -7232,6 +7232,10 @@
     <primary>pg_get_serial_sequence</primary>
    </indexterm>

+   <indexterm zone="functions-misc">
+    <primary>pg_tablespace_databases</primary>
+   </indexterm>
+
   <para>
    <xref linkend="functions-misc-catalog-table"> lists functions that
    extract information from the system catalogs.
@@ -7325,6 +7329,11 @@
        <entry>get name of the sequence that a serial or bigserial column
        uses</entry>
       </row>
+      <row>
+
<entry><literal><function>pg_tablespace_databases</function>(<parameter>namespace_oid</parameter>)</literal></entry>
+       <entry><type>setof oid</type></entry>
+       <entry>get set of database oids that have objects in the namespace</entry>
+      </row>
      </tbody>
     </tgroup>
    </table>
@@ -7360,6 +7369,16 @@
    for passing to the sequence functions (see <xref
    linkend="functions-sequence">).
    NULL is returned if the column does not have a sequence attached.
+  </para>
+
+  <para>
+  <function>pg_tablespace_databases</function> allows usage examination of a
+  tablespace. It will return a set of database oids, that have objects
+  stored in the tablespace. If this function returns any row, the
+  tablespace is assumed not to be empty and cannot be dropped. To
+  display the actual objects  populating the tablespace, you will need
+  to connect to the databases returned by
+  <function>pg_tablespace_databases</function> to query pg_class.
   </para>

    <indexterm zone="functions-misc">

pgsql-patches by date:

Previous
From: "Andrew Dunstan"
Date:
Subject: Re: latest plperl
Next
From: "Andrew Dunstan"
Date:
Subject: Re: latest plperl