A little reformatting for better print appearance.
authorPeter Eisentraut
Wed, 31 Oct 2001 20:39:30 +0000 (20:39 +0000)
committerPeter Eisentraut
Wed, 31 Oct 2001 20:39:30 +0000 (20:39 +0000)
doc/src/sgml/libpq.sgml
doc/src/sgml/odbc.sgml
doc/src/sgml/spi.sgml

index 1e2c09aaf5bd51fa20551dde1658e5e1a3c4bcc6..d1bb9e7745b6a0e402dde1f002f3d7a729f3cec6 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -29,11 +29,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.73 2001/10/12 23:32:34 momji
    complete examples of libpq applications in the
    following directories:
 
-   
-../src/test/regress
-../src/test/examples
-../src/bin/psql
-   
+   
+    src/test/examples
+    src/bin/psql
+   
   
 
   
@@ -382,21 +381,21 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
     particular order, or at all, or on the status always being one of these
     documented values. An application may do something like this:
 
-    switch(PQstatus(conn))
-    {
-        case CONNECTION_STARTED:
-            feedback = "Connecting...";
-       break;
+switch(PQstatus(conn))
+{
+    case CONNECTION_STARTED:
+        feedback = "Connecting...";
+        break;
 
-        case CONNECTION_MADE:
-            feedback = "Connected to server...";
-            break;
+    case CONNECTION_MADE:
+        feedback = "Connected to server...";
+        break;
 .
 .
 .
-        default:
-       feedback = "Connecting...";
-    }
+    default:
+        feedback = "Connecting...";
+}
 
   
 
index 06ffedef40ab211b9d6146973340c0482c1b7061..a0563b6fa9386858ebc228a5df165646fc625145 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -380,18 +380,18 @@ InstallDir = /opt/applix/axdata/axshlib
     At the bottom of axnet.cnf,
     find the line that starts with
 
-    
+
 #libFor elfodbc /ax/...
-    
+
    
        
        
    
     Change line to read
 
-    
+
 libFor elfodbc applixroot/applix/axdata/axshlib/lib
-    
+
 
     which will tell elfodbc to look in this directory
     for the ODBC support library.
@@ -410,9 +410,9 @@ libFor elfodbc applixroot/applix/axdata/axshlib/lib
        Create .odbc.ini as 
        described above.  You may also want to add the flag
 
-       
+
 TextAsLongVarchar=0
-       
+
 
        to the database-specific portion of .odbc.ini
        so that text fields will not be shown as **BLOB**.
@@ -438,34 +438,34 @@ TextAsLongVarchar=0
 
        
    
-    Select <command>Query->Choose Server>.  
+    Select <menuchoice>QueryChoose Server>.  
    
        
        
    
-    Select <acronym>ODBC, and click Browse>.
+    Select <guimenuitem>ODBC, and click Browse>.
     The database you configured in .odbc.ini
-    should be shown.  Make sure that the <option>Host: field
+    should be shown.  Make sure that the <guilabel>Host: field
     is empty (if it is not, axnet will try to contact axnet on another machine
     to look for the database).
    
        
        
    
-    Select the database in the box that was launched by <command>Browse>,
-    then click <command>OK>.
+    Select the database in the box that was launched by <guibutton>Browse>,
+    then click <guibutton>OK>.
    
        
        
    
     Enter user name and password in the login identification dialog,
-    and click <command>OK>.
+    and click <guibutton>OK>.
    
        
       
 
       
-       You should see <literal>Starting elfodbc serverl>
+       You should see <guilabel>Starting elfodbc serverl>
        in the lower left corner of the
        data window.  If you get an error dialog box, see the debugging section
        below.
@@ -479,9 +479,12 @@ TextAsLongVarchar=0
      
      
       
-       Select a table from Query->Choose tables, and then select Query->Query
-       to access the database.  The first 50 or so rows from the table should
-       appear.
+       Select a table from
+       QueryChoose
+       tables, and then select
+       QueryQuery
+       to access the database.  The first 50 or so rows from the table
+       should appear.
       
      
     
@@ -530,7 +533,7 @@ TextAsLongVarchar=0
    
     The driver process has terminated due to some other
     problem.  You might not have an up-to-date version
-    of the Postgres
+    of the PostgreSQL
     ODBC package.
    
        
@@ -595,24 +598,24 @@ TextAsLongVarchar=0
        Start an strace on
        the axnet process.  For example, if
 
-       >
-% ps -aucx | grep ax 
-       >
+>
+$ ps -aucx | grep ax
+>
 
        shows
 
-       >
+>
 cary   10432  0.0  2.6  1740   392  ?  S  Oct  9  0:00 axnet
 cary   27883  0.9 31.0 12692  4596  ?  S   10:24  0:04 axmain
-       >
+>
       
 
       
        Then run
 
-       >
-% strace -f -s 1024 -p 10432
-       >
+>
+$ strace -f -s 1024 -p 10432
+>
       
      
 
@@ -638,14 +641,14 @@ cary   27883  0.9 31.0 12692  4596  ?  S   10:24  0:04 axmain
      a Cannot launch gateway on server
      I ran strace on axnet and got
 
-<programlisting>
+<screen>
 [pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
 (No such file or directory)
 [pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
 (No such file or directory)
 [pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
 can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
-programlisting>  
+screen>  
      So what is happening is that applix elfodbc is searching for libodbc.so, but it
      cannot find it.  That is why axnet.cnf needed to be changed.
     
index 8f9dd39c68ab56f665a6a29748da80ab438f9b72..23ae5dd49be355d9e2378845a1b8079c59edbf01 100644 (file)
@@ -2821,11 +2821,13 @@ execq(text *sql, int cnt)
    Now, compile and create the function:
 
 
-CREATE FUNCTION execq (TEXT, INT4) RETURNS INT4 AS '...path_to_so' LANGUAGE 'c';
+CREATE FUNCTION execq (text, integer) RETURNS integer
+    AS '...path_to_so'
+    LANGUAGE C;
 
 
 
-vac=> SELECT execq('CREATE TABLE a (x INT4)', 0);
+vac=> SELECT execq('CREATE TABLE a (x INTEGER)', 0);
 execq
 -----
     0