@@ -6,30 +6,6 @@ Attached is a copy of the Postgres support routines I wrote to allow me
66to more cleanly interface to the libpg library, more like a 4gl SQL
77interface.
88
9- It has several features that may be useful for others:
10-
11- I have simplified the C code that calls libpq by wrapping all the
12- functionality of libpq in calls to connectdb(), doquery(), fetch(),
13- fetchwithnulls() and disconnectdb(). Each call returns a structure or
14- value, so if you need to do more work with the result, you can. Also, I
15- have a global variable that allows you to disable the error checking I
16- have added to the doquery() routine.
17-
18- I have added a function called fetch(), which allows you to pass
19- pointers as parameters, and on return the variables are filled with data
20- from the binary cursor you opened. These binary cursors are not useful
21- if you are running the query engine on a system with a different
22- architecture than the database server. If you pass a NULL pointer, the
23- column is skipped, and you can use libpq to handle it as you wish.
24-
25- There are two functions, get_result() and set_result(), that allow you
26- to handle multiple result sets at the same time.
27-
28- There is a reset_fetch() that starts the fetch back at the beginning.
29-
30- There is a demo program called pginsert that demonstrates how the
31- library can be used.
32-
339You can create a library of pginterface.c and halt.c, and just include
3410pginterface.h in your source code.
3511