
LIBPQTYPES CHANGE LOG
---------------------

Initially, libpqtypes was a libpq patch named (PQparam/PGparam) and can
be found on the -hackers and -patches mailing lists.  This change log
begins at the point libpqtypes was put on pgfoundry as its own project.

Feb 11, 2009 v1.3.1
- PQgetf of an empty array was always returning a result with a single 
  tuple (array item), eventhough the PGarray members were correctly set
  for an empty array.  This has been fixed.
- Added empty array test to regression-test.c. 
- getaddrinfo is missing on Windows 2000 and earlier versions.  Wspiapi.h
  and ws2tcpip.h must be included to provide a replacement.  libpqtypes-int.h
  neglected to include Wspiapi.h, which it now does.
  Microsoft docs on issue: http://support.microsoft.com/kb/955045

Feb 03, 2009 v1.3.0
- The internal put_int2 and put_int4 type handlers were passing a va_arg
  call as an argument to the pqt_buf_putint2 and pqt_buf_putint4 macros.
  This corrupted the value being put on UnixWare 7.1.4.  The return
  of va_arg is now stored in a local variable that is passed to
  one of the putintX macros.
- Renamed PGinet sa_len member since it conflicts with some systems.
  For instance: SCO UnixWare defines a sa_len macro in sys/socket.h
  #define sa_len sa_un.sa_s.sa_saus_len
  Renamed it to sa_buf_len and changed all references.
- network.c had an issue with struct sockaddr not being zero'd on AIX.
  This caused all inet/cidr tests to fail.  Update regresion-test.c
  with similar fixes.
- AI_NUMERICHOST defined if not available in network.c.  If getaddrinfo
  fails with EAI_BADFLAGS, its tried again w/o numeric host.
- AIX defaults to an unsigned char, which broke "char" type handling.
  Changed PGchar typedef to signed char and added the GCC option
  -fsigned-char to configure.ac.
- Changed the return type of PQgeterror from a const char* to a char*.
  Having it be const served no purpose.
- Added PQparamCount which returns the number of parameters in a PGparam.
  Added PQparamCount.3 man page and updated Makefile.
- Made errFields implementation more memory efficient by allocating all
  fields as a single reusable buffer.
- Reformatted code to match PostgreSQL Project.  This changed every
  source file so take note when looking at CVS diffs.
- Defined HAVE_VSNPRINTF in port.c when compiling for mingw or cygwin.
- Fixed man page errors in PQputf and pqt-handlers.
- Updated INSTALL file to include the 'install' and uninstall' targets.
- Makefile.am (unix make) now installs PQgetErrorField man page.
- Update copyright notices to reflect 2009: source files, LICENSE
  and man pages.
- Removed typeargs state flag PUT_STATE_FREEOUT from param.c since it
  is no longer used.

Dec 03, 2008 v1.2e
- Added support for PQresultErrorField as PQgetErrorField.  PQparamExec and
  PQparamExecPrepared clear resutls in a failure status, thus removing
  the abillity to get error fields.  PQgetErrorField can now be used and
  it doesn't require a result.

Dec 02, 2008 v1.2d
- Fixed bug when putting a NULL array item; %null or %pqt.null.  array.c
  was not adding in the 4 byte length when the length's value was NULL_LEN.
  This resulted in "ERROR:  insufficient data left in message" errors from
  the server during a PQparamExec() call.
- Added a %null test in regression-test.c for composites and arrays.

Nov 18, 2008 v1.2c
- removed GCC __thread modifier from error.c.  Only pthread TLS keys
  are now used.  The TLS key for the error system is now intialized
  with the GCC function attribute "constructor"; which replaced _init().
  This GCC attribute has been around since GCC version 2.7.0, old enough.
  The error system used to intialize the TLS key via pthread_once(),
  but this function is broken on all version of Solaris prior to 10
  (its actually a stub function the returns 0).  This means libpqtypes
  versions prior to this one cannot use thread-safe mode on Solaris 9 or
  below.  Windows continues to use __declspec(thread).
- The PATH geo type was completely broken (SIGBUS) on many RISC processors,
  we tested a couple of UltraSparcs, Itanium, PA-RISC and MIPS.  This is
  due to memory alignment issues (boy, spoiled by x86!).  A configure
  check was added to detect when strict memory alignment is required
  (STRICT_MEMORY_ALIGNMENT) and the source is toggled appropriately.
- Add pqt_buf_xxx functions to abstract reading and writing data
  to/from buffers.  Another memory alignment change.
- fixed regression-test.c on hpux which was referencing unknown macros:
  LLONG_MAX and LLONG_MIN.  HPUX uses LONG_LONG_MAX.
- cleaned up a few things in Makefile.am (unix make file)
- win32.mak for MSVC had an issue with include variable.  created INC2
  to solve this.

Nov 11, 2008 v1.2b
- Added a type specifier caching system.  Whenever putf or getf are
  called, it compares the specifier string with the last one libpqtypes
  saw.  If it is a match, the parsing and type handler lookup
  stage can be bipassed, giving a 25% performance increase for arrays
  and large result sets.  This also makes libpqtypes noticably faster
  than using libpq in text mode ... PQexec.
- preprocessing bug in port.c, #elif HAVE_VSNPRINTF instead of
  #elif defined(HAVE_VSNPRINTF).
- windows was completely broken from a change in v1.2a.  Apparantley
  windows has different memory addresses for DLL exported functions;
  the address seen outside the DLL and the address seen from within the DLL.
  This broke the PQtypesRegister macro that was referencing PQtypesEventProc,
  since the external address was being used to register the event proc
  but the internal address was being used by libpqtypes.  This problem was
  solved by converting PQtypesRegister to a function, which forces the
  event proc to always be referenced from within libpqtypes.
  PQtypesEventProc was completely removed form the public interface.
- Updated make system to be more configurable, allows setting things
  like CC, CFLAGS, etc.. at the prompt (see INSTALL).

Sept 26, 2008 v1.2a
- libpqtypes uses the libpq event system, an approaved patch for 8.4.
  The object hooks patch was redesigned and than renamed to libpq events.
- bug fix in timestamp code
- memory leak fix in error system, didn't clean up thread memory.
- pqytpe's PGEventProc is now a public function named PQtypesEventProc

May 19, 2008 v1.0c
- Bug fix in datetime.c.  When performing a time value conversion, 1-based
  and 0-based month values were being used/confused.
- libpqtypes using objecthooks, a proposed patch for libpq allowing
  outside apps, like libpqtypes, to hook into libpq.

May 09, 2008 v1.0b
- Added copyright notice to all source files.
- Updated several man pages.
- Added an include for stdarg.h to libpqtypes.h
- Updated makefile and groff2html

April 28, 2008 v1.0
- libpqtypes project was created on pgfoundry
- make system was put into place (mingw, cygwin and msvc support)
