Add Bruce's pgeasy doc from the man page.
authorThomas G. Lockhart
Fri, 31 Mar 2000 03:26:21 +0000 (03:26 +0000)
committerThomas G. Lockhart
Fri, 31 Mar 2000 03:26:21 +0000 (03:26 +0000)
doc/src/sgml/libpgeasy.sgml [new file with mode: 0644]
doc/src/sgml/postgres.sgml
doc/src/sgml/programmer.sgml

diff --git a/doc/src/sgml/libpgeasy.sgml b/doc/src/sgml/libpgeasy.sgml
new file mode 100644 (file)
index 0000000..572e296
--- /dev/null
@@ -0,0 +1,155 @@
+
+
+  libpgeasy - Simplified C Binding Library
+
+  
+   Author
+
+   
+    Written by Bruce Momjian
+    and last updated 2000-03-30.
+   
+  
+
+  
+   pgeasy allows you to cleanly interface
+   to the libpq library,
+   more like a 4GL SQL interface.
+  
+
+  
+   It consists of set of simplified C functions that encapsulate the
+   functionality of libpq.
+   The functions are:
+
+   
+    
+     
+PGresult   *doquery(char *query);
+     
+    
+
+    
+     
+PGconn     *connectdb();
+     
+    
+
+    
+     
+void        disconnectdb();
+     
+    
+
+    
+     
+int         fetch(void *param,...);
+     
+    
+
+    
+     
+int         fetchwithnulls(void *param,...);
+     
+    
+
+    
+     
+void        reset_fetch();
+     
+    
+
+    
+     
+void        on_error_continue();
+     
+    
+
+    
+     
+void        on_error_stop();
+     
+    
+
+    
+     
+PGresult   *get_result();
+     
+    
+
+    
+     
+void        set_result(PGresult *newres);
+     
+    
+
+    
+     
+void        unset_result(PGresult *oldres);
+     
+    
+   
+  
+
+  
+   Many functions return a structure or value, so you can do more work
+   with the result if required.
+  
+
+  
+   You basically connect to the database with connectdb,
+   issue your query with doquery,
+   fetch the results with fetch,
+   and finish with disconnectdb.
+  
+
+  
+   For select queries, fetch
+   allows you to pass pointers as parameters, and on return the variables
+   are filled with data from the binary cursor you opened.  These binary
+   cursors can not be used if you are running the
+   pgeasy
+   client on a system with a different architecture than the database
+   server.  If you pass a NULL pointer parameter, the column is skipped.
+   fetchwithnulls allows you to retrieve the NULL
+   status of the field by passing an int*
+   after each result pointer, which returns true or false if the field is null.
+   You can always use libpq functions on the PGresult pointer returned
+   by doquery.
+   reset_fetch starts the fetch back at the beginning.
+  
+
+  
+   get_result,
+   set_result,
+   and
+   unset_result
+   allow you to handle multiple result sets at the same time.
+  
+
+  
+   There are a variety of demonstration programs in the
+   source directory.
+  
+
+
index f189b9b010e42afc80787875fc2922d61b57ec09..e59289c63151571fca3a9bb2ffc0e219899d5125 100644 (file)
@@ -1,3 +1,7 @@
+
+
 
 
 
@@ -68,6 +72,7 @@
 
 
 
+
 
 
 
@@ -269,6 +274,7 @@ Your name here...
    &libpq;
    &libpqpp;
    &libpgtcl;
+   &libpgeasy;
    &odbc;
    &jdbc;
    &lisp;
@@ -345,7 +351,7 @@ sgml-indent-data:t
 sgml-parent-document:nil
 sgml-default-dtd-file:"./reference.ced"
 sgml-exposed-tags:nil
-sgml-local-catalogs:("/usr/lib/sgml/CATALOG")
+sgml-local-catalogs:("/usr/lib/sgml/catalog")
 sgml-local-ecat-files:nil
 End:
 -->
index e09a37e605024fde0982bc1efe5802f0e05930ab..5503b82d802395de9413b378d94b8a856e448afe 100644 (file)
@@ -1,66 +1,18 @@
 
 
 
 
-
-
-
-
-
-
-
+  SYSTEM "about.sgml">
+  SYSTEM "history.sgml">
+  SYSTEM "info.sgml">
+  SYSTEM "legal.sgml">
+  SYSTEM "notation.sgml">
+  SYSTEM "problems.sgml">
+  SYSTEM "y2k.sgml">
 
 
 
@@ -71,6 +23,7 @@ Make new file current.sgml to hold release info for the current release.
 
 
 
+
 
 
 
@@ -201,6 +154,7 @@ Disable it until we put in some info.
   &libpq;
   &libpqpp;
   &libpgtcl;
+  &libpgeasy;
   &ecpg;
   &odbc;
   &jdbc;
@@ -246,7 +200,7 @@ sgml-indent-data:t
 sgml-parent-document:nil
 sgml-default-dtd-file:"./reference.ced"
 sgml-exposed-tags:nil
-sgml-local-catalogs:("/usr/lib/sgml/CATALOG")
+sgml-local-catalogs:("/usr/lib/sgml/catalog")
 sgml-local-ecat-files:nil
 End:
 -->