On Thu, Jul 8, 2010 at 11:01 PM, Peter Eisentraut <pete...@gmx.net> wrote:
> On tor, 2010-07-08 at 20:01 +0100, Daniele Varrazzo wrote:
>> I can surely provide you a list, there are just a dozen of them (I'll
>> tell you which ones later, now I can't). But then I should bother you
>> every time I need a new link, or write a patch for it and wait for it
>> to be applied and then for the result to be rendered and published on
>> /docs... so I thought generating all of them programmatically would
>> improve the docs quality and would be a better solution for the
>> future.
>
> Sure, if you have an idea how to do that.

Attached there is a patch adding an id to the indexterms currently
referred by psycopg documentation, to be applied to the current head.
However I've tried to render the html docs with the head itself and I
see anchors are not generated anymore, while they are generated by the
makefile shipped in 8.4.4. Is this a decision or it just happened? In
the former case there is no point in applying the patch then.

I've also played with good results with a script to inject ids in all
the indexterm, but if the decision is to not provide anchors in the
middle of the page I think you wouldn't be interested in it.

Regards.

-- Daniele
diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml
index cfe577d..af381d7 100644
--- a/doc/src/sgml/datatype.sgml
+++ b/doc/src/sgml/datatype.sgml
@@ -3076,7 +3076,7 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
    <sect2>
     <title>Points</title>
 
-    <indexterm>
+    <indexterm id="point">
      <primary>point</primary>
     </indexterm>
 
diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml
index 8df9a1c..2f913c6 100644
--- a/doc/src/sgml/libpq.sgml
+++ b/doc/src/sgml/libpq.sgml
@@ -683,7 +683,7 @@ PGconn *PQsetdb(char *pghost,
 
     <varlistentry>
      <term><function>PQconnectStartParams</function><indexterm><primary>PQconnectStartParams</></></term>
-     <term><function>PQconnectStart</function><indexterm><primary>PQconnectStart</></></term>
+     <term><function>PQconnectStart</function><indexterm id="pqconnectstart"><primary>PQconnectStart</></></term>
      <term><function>PQconnectPoll</function><indexterm><primary>PQconnectPoll</></></term>
      <listitem>
       <para>
@@ -1275,7 +1275,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
     <varlistentry>
      <term>
       <function>PQtransactionStatus</function>
-      <indexterm>
+      <indexterm id="pqtransactionstatus">
        <primary>PQtransactionStatus</primary>
       </indexterm>
      </term>
@@ -1311,7 +1311,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
     <varlistentry>
      <term>
       <function>PQparameterStatus</function>
-      <indexterm>
+      <indexterm id="pqparameterstatus">
        <primary>PQparameterStatus</primary>
       </indexterm>
      </term>
@@ -1390,7 +1390,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
     <varlistentry>
      <term>
       <function>PQprotocolVersion</function>
-      <indexterm>
+      <indexterm id="pqprotocolversion">
        <primary>PQprotocolVersion</primary>
       </indexterm>
      </term>
@@ -1417,7 +1417,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
     <varlistentry>
      <term>
       <function>PQserverVersion</function>
-      <indexterm>
+      <indexterm id="pqserverversion">
        <primary>PQserverVersion</primary>
       </indexterm>
      </term>
@@ -1492,7 +1492,7 @@ PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
     </varlistentry>
 
     <varlistentry>
-     <term><function>PQbackendPID</function><indexterm><primary>PQbackendPID</></></term>
+     <term><function>PQbackendPID</function><indexterm id="pqbackendpid"><primary>PQbackendPID</></></term>
      <listitem>
       <para>
        Returns the process <acronym>ID</acronym>
diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml
index 5d47397..301cd0f 100644
--- a/doc/src/sgml/lobj.sgml
+++ b/doc/src/sgml/lobj.sgml
@@ -166,7 +166,7 @@ inv_oid = lo_create(conn, desired_oid);
 <synopsis>
 Oid lo_import(PGconn *conn, const char *filename);
 </synopsis>
-     <indexterm><primary>lo_import</></>
+     <indexterm id="lo-import"><primary>lo_import</></>
      <replaceable class="parameter">filename</replaceable> 
      specifies the operating system name of
      the file to be imported as a large object.
@@ -209,7 +209,7 @@ Oid lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
 <synopsis>
 int lo_export(PGconn *conn, Oid lobjId, const char *filename);
 </synopsis>
-     <indexterm><primary>lo_export</></>
+     <indexterm id="lo-export"><primary>lo_export</></>
      The <parameter>lobjId</parameter> argument specifies the OID of the large
      object to export and the <parameter>filename</parameter> argument
      specifies the operating system name of the file.  Note that the file is
@@ -346,7 +346,7 @@ int lo_tell(PGconn *conn, int fd);
 <synopsis>
 int lo_truncate(PGcon *conn, int fd, size_t len);
 </synopsis>
-     <indexterm><primary>lo_truncate</></> truncates the large object
+     <indexterm id="lo-truncate"><primary>lo_truncate</></> truncates the large object
      descriptor <parameter>fd</> to length <parameter>len</>.  The
      <parameter>fd</parameter> argument must have been returned by a
      previous <function>lo_open</function>.  If <parameter>len</> is
-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Reply via email to