---------------------------------------
GDI interface notes as of 8/9/93
---------------------------------------

Known bugs and suspected problem areas are listed below.  This interface
is new, so we expect there will be more.  Send email to Jean Anderson at 
jean_anderson@postgres.berkeley.edu or jean@gso.saic.com.

People can help us track down problems if they include gdi_error_init
in the program, then run it with debug level 2.  The sample programs 
in test/c and test/fortran show how to call gdi_error_init.


--------------------------
#0 S-PLUS
--------------------------

We made many changes to the GDI since the last time we compiled it with 
S-PLUS. So S-PLUS has not been hooked up yet to the new version of the 
GDI that supports POSTGRES.  We hope to get it going this week.

--------------------------
#1 Linking
--------------------------

The order in which gdi libraries are linked is unfortunately important.
Worse yet, it is different for C than for FORTRAN temporarily.

test/c/Makefile is set up like this--and this is how we want it to work:

     LIBS     = ../../lib/libgdi.a      \
                ../../lib/libgdipg.a

For now, test/fortran/Makefile is set up like this:

     LIBS     = ../../lib/pg_link.o     \
                ../../lib/libgdipg.a    \
                ../../lib/libgdi.a

This is a side-effect from the gdi initialization using GDI_TURBO in a
couple queries.  This will be replaced soon by a new gdi function that
will return a single simple value, a sort of "fast submit" when you know
all you are going to get back is a single value.

--------------------------
#2 GDI Functionality
--------------------------
   Not all GDI functions have been implemented in the postgres interface yet.

   gdi_print has not been updated to handle postgres unsigned and array types.

--------------------------
#3 Constructors
--------------------------

   Embedded quotes in arrays of strings are not properly handled yet.

   GDI_TURBO and FORTRAN are the only constructors that handle array types.

   If you want to retrieve array attributes with one of the other C 
   constructors, retrieve just the first element of the array. Don't try
   to use the FORTRAN constructor from C; results will be peculiar (and wrong).

   FORTRAN NOTES:
   -------------
   String arrays have not been tested yet (they stand a poor chance of working).

   Undimensioned numeric arrays have not been tested yet (they stand a good 
   chance of working).

   Only 2D arrays are currently supported but we think we will be able to
   handle multidimensional (see test/fortran/FORTRAN_NOTES).

--------------------------
#4 TM & Error Handling
--------------------------

   In the lower bellies of gdi_submit, pg_submit starts a transaction if the 
   command is a retrieve. If it fails, pg_submit aborts the transaction, 
   resulting in the following message:

     NOTICE:Aug  6 14:49:10:UserAbortTransactionBlock and not inprogress state
     NOTICE:Aug  6 14:49:10:AbortTransaction and not in in-progress state 

   Subsequent retrieves work just fine.

   If the transaction is not aborted, there is no complaint, but an error 
   occurs on the next retrieve.

   So there is still a problem in pg_submit's tm handling.

--------------------------
#5 Data Types
--------------------------

   Data type handling is poor and we are thinking about ways to handle
   types dynamically. Suggestions are welcome.

   Data types are hard coded. Adding a user-defined data type requires 
   adding it to pg_types.c [ pg_s2k_types() and pg_derive_default_ctype() ] 
   and to pg_types.h. It must be coerced to a recognized GDI type
   (see dbCtype in libgendb.h).

   Only simple types and arrays of simple types are supported. Anything else 
   is returned as a string. 

   Large objects are not supported yet.

   The GDI doesn't do unsigned types yet. That's a high priority since the
   oids on bigfoot are getting bigger and bigger; however it effects quite
   a few things so it has to be done carefully.

   No bounds checking on numbers. That will be expensive. Do people want it?
   Jean *will* add bounds checking for the unsigned longs used by oids until
   we can put unsigned types into the GDI.

--------------------------
#6 Man Pages
--------------------------

   Man pages have not been qa'd for POSTGRES or the FORTRAN interface.
