11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpgeasy.sgml,v 2.8 2002/01/07 02:29:12 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpgeasy.sgml,v 2.9 2002/03/04 18:50:20 momjian Exp $
33-->
44
55 <chapter id="pgeasy">
@@ -11,21 +11,20 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpgeasy.sgml,v 2.8 2002/01/07 02:29
1111 <para>
1212 Written by Bruce Momjian
1313 (<email>pgman@candle.pha.pa.us</email>)
14- and last updated2000 -03-30
14+ and last updated2002 -03-04
1515 </para>
1616 </note>
1717
1818 <para>
1919 <application>pgeasy</application> allows you to cleanly interface
2020 to the <application>libpq</application> library, more like a 4GL
2121 SQL interface. Refer to <xref linkend="libpq"> for more
22- information about <application>libpq</application>
22+ information about <application>libpq</application>.
2323 </para>
2424
2525 <para>
26- It consists of set of simplified C functions that encapsulate the
27- functionality of <application>libpq</application>.
28- The functions are:
26+ It consists of a set of simplified C functions that encapsulate the
27+ functionality of <application>libpq</application>. The functions are:
2928
3029 <itemizedlist>
3130 <listitem>
@@ -88,53 +87,50 @@ void set_result(PGresult *newres);
8887</synopsis>
8988 </listitem>
9089
91- <listitem>
92- <synopsis>
93- void unset_result(PGresult *oldres);
94- </synopsis>
95- </listitem>
9690 </itemizedlist>
9791 </para>
9892
9993 <para>
100- Many functions return a structure or value, so you cando more work
94+ Many functions return a structure or value, so you can work
10195 with the result if required.
10296 </para>
10397
10498 <para>
105- You basically connect to the database with <function>connectdb</function>,
106- issue your query with <function>doquery</function>,
107- fetch the results with <function>fetch</function>,
108- and finish with <function>disconnectdb</function>.
99+ You basically connect to the database with
100+ <function>connectdb</function>, issue your query with
101+ <function>doquery</function>, fetch the results with
102+ <function>fetch</function>, and finish with
103+ <function>disconnectdb</function>.
109104 </para>
110105
111106 <para>
112107 For <literal>SELECT</literal> queries, <function>fetch</function>
113- allows you to pass pointers as parameters, and on return the variables
114- are filled with data from the binary cursor you opened. These binary
115- cursors cannot be used if you are running the
116- <application>pgeasy</application>
117- client on a system with a different architecture than the database
118- server. If you pass a NULL pointer parameter, the column is skipped.
119- <function>fetchwithnulls</function> allows you to retrieve the NULL
120- status of the field by passing an <literal>int*</literal>
121- after each result pointer, which returns true or false if the field is null.
122- You can always use <application>libpq</application> functions on the <structname>PGresult</structname> pointer returned
123- by <function>doquery</function>.
124- <function>reset_fetch</function> starts the fetch back at the beginning.
108+ allows you to pass pointers as parameters, and on return the
109+ variables are filled with data from the binary cursor you opened.
110+ These binary cursors cannot be used if you are running the
111+ <application>pgeasy</application> client on a system with a different
112+ architecture than the database server. If you pass a NULL pointer
113+ parameter, the column is skipped. <function>fetchwithnulls</function>
114+ allows you to retrieve the NULL status of the field by passing an
115+ <literal>int*</literal> after each result pointer, which returns true
116+ or false to indicate if the field is null. You can always use
117+ <application>libpq</application> functions on the
118+ <structname>PGresult</structname> pointer returned by
119+ <function>doquery</function>. <function>reset_fetch</function> starts
120+ the fetch back at the beginning.
125121 </para>
126122
127123 <para>
128- <function>get_result</function>,
129- <function>set_result</function>,
130- and
131- <function>unset_result </function>
132- allow you tohandle multiple result sets at thesame time .
124+ <function>get_result</function> and <function>set_result</function>
125+ allow you to handle multiple open result sets. Use
126+ <function>get_result</function> to save a result into an application
127+ variable. You can then later use <function>set_result </function> to
128+ return to thepreviously save result .
133129 </para>
134130
135131 <para>
136- There are several demonstration programs in the
137- source directory .
132+ There are several demonstration programs in
133+ <filename>pgsql/src/interfaces/libpgeasy/examples</> .
138134 </para>
139135 </chapter>
140136