Re: Alvaro Herrera 2016-04-09 <20160408232553.GA721890@alvherre.pgsql>
> It's useful, no doubt.

It's cool :)

> I pushed it.

Here's a small doc patch that removes the bogus space in "colH [:scolH]"
(otherwise psql complains that it is ignoring the 4th parameter.

It also adds an index entry and adds a note to the old crosstab
functions to make people aware of \crosstabview.

Christoph
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
new file mode 100644
index 1f07956..e6b5a7e
*** a/doc/src/sgml/ref/psql-ref.sgml
--- b/doc/src/sgml/ref/psql-ref.sgml
*************** testdb=&gt;
*** 990,999 ****
        </varlistentry>
  
        <varlistentry>
          <term><literal>\crosstabview [
              <replaceable class="parameter">colV</replaceable>
!             <replaceable class="parameter">colH</replaceable>
!             [:<replaceable class="parameter">scolH</replaceable>]
              [<replaceable class="parameter">colD</replaceable>]
              ] </literal></term>
          <listitem>
--- 990,1002 ----
        </varlistentry>
  
        <varlistentry>
+         <indexterm>
+           <primary>crosstabview</primary>
+         </indexterm>
+ 
          <term><literal>\crosstabview [
              <replaceable class="parameter">colV</replaceable>
!             <replaceable class="parameter">colH</replaceable>[:<replaceable class="parameter">scolH</replaceable>]
              [<replaceable class="parameter">colD</replaceable>]
              ] </literal></term>
          <listitem>
diff --git a/doc/src/sgml/tablefunc.sgml b/doc/src/sgml/tablefunc.sgml
new file mode 100644
index 1d8423d..02653d5
*** a/doc/src/sgml/tablefunc.sgml
--- b/doc/src/sgml/tablefunc.sgml
*************** row2    val21   val22   val23   ...
*** 192,197 ****
--- 192,204 ----
      calling query).
     </para>
  
+    <note>
+    <para>
+    The psql <command>\crosstabview</command> provides similar functionality
+    that is easier to use (albeit not on the SQL level).
+    </para>
+    </note>
+ 
     <para>
      For example, the provided query might produce a set something like:
  <programlisting>
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to