<!--
doc/src/sgml/ref/pgpool_adm_pcp_node_info.sgml
Pgpool-II documentation
-->

<refentry id="PGPOOL-ADM-PCP-NODE-INFO">
 <indexterm zone="pgpool-adm-pcp-node-info">
  <primary>pgpool_adm_pcp_node_info</primary>
 </indexterm>

 <refmeta>
  <refentrytitle>pgpool_adm_pcp_node_info</refentrytitle>
  <manvolnum>3</manvolnum>
  <refmiscinfo>pgpool_adm extension</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pgpool_adm_pcp_node_info</refname>
  <refpurpose>
	a function to display the information on the given node
	ID</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
   <funcsynopsis>
     <funcprototype>
       <funcdef><function>pcp_node_info</function> returns record</funcdef>
       <paramdef>integer <parameter>node_id</parameter></paramdef>
       <paramdef>text <parameter>host</parameter></paramdef>
       <paramdef>integer <parameter>port</parameter></paramdef>
       <paramdef>text <parameter>username</parameter></paramdef>
       <paramdef>text <parameter>password</parameter></paramdef>
       <paramdef>out <parameter>status text</parameter></paramdef>
       <paramdef>out <parameter>weight float4</parameter></paramdef>
     </funcprototype>
     
     <funcprototype>
       <funcdef><function>pcp_node_info</function> returns record</funcdef>
       <paramdef>integer <parameter>node_id</parameter></paramdef>
       <paramdef>text <parameter>pcp_server</parameter></paramdef>
       <paramdef>out <parameter>status text</parameter></paramdef>
       <paramdef>out <parameter>weight float4</parameter></paramdef>
     </funcprototype>

   </funcsynopsis>
 </refsynopsisdiv>

 <refsect1 id="R3-PCP-NODE-INFO-3">
  <title>Description</title>
  <para>
  <function>pcp_node_info</function>
	displays the information on the given node ID.
  </para>
 </refsect1>

 <refsect1>
  <title>Arguments</title>
   <para>
    <variablelist>

     <varlistentry>
      <term><replaceable class="parameter">node_id</replaceable></term>
      <listitem>
       <para>
	 The index of backend node to get information of.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><replaceable class="parameter">pcp_server</replaceable></term>
      <listitem>
	<para>
	  The foreign server name for pcp server.
	</para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>Other arguments </option></term>
      <listitem>
       <para>
	 See <xref linkend="pcp-common-options">.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
 </refsect1>

 <refsect1>
  <title>Example</title>
   <para>
	Here is an example output:
	<programlisting>
test=# SELECT * FROM pcp_node_info(0,'',11001,'t-ishii','t-ishii');
 host | port  |      status       | weight 
------+-------+-------------------+--------
 /tmp | 11002 | Connection in use |      0
(1 row)
    </programlisting>
  </para>

 </refsect1>

</refentry>
