version.txt date: 5/8/98 version: 06.30.0237 --------------------------------------------------------------------- This file describes changes and or fixes since the last update. BUG-FIXES: 1. The problem with multiple cursors in a BEGIN/END closing prematurely has been fixed. (reported by Benoit Foucher) This would cause the driver to hang since the cursor was closed. NEW FEATURES: 1. The driver has been updated to accept and send dates in ISO format. Thus, the driver always issues a command upon connection to set the backend datestyle to 'ISO'. If you have any manual 'ConnSettings' that set the datestyle to 'US', you should remove them now. 2. The notion of a "DEFAULT" DataSource has been added. If you have a Datasource with the name "PostgreSQL", it will be used for defaults when setting up a new datasource. This actually works now! 3. The use of cursors is now a driver option. If you dont use cursors, the driver will attempt to retrieve the entire result set. Because memory allocation has been improved, this may work with a reasonable amount of rows. See dialog box settings for more info. 4. SQLExtendedFetch has been re-implemented to work when not using cursors. It has been tested and supports the following fetch types: SQL_FETCH_NEXT, SQL_FETCH_PRIOR, SQL_FETCH_FIRST, SQL_FETCH_LAST, SQL_FETCH_ABSOLUTE. 5. BPCHAR(i.e., char[x]) is now a SQL_CHAR data type. Thus, varchar should be the only type that reports "SQL_VARCHAR", unless you change the options under "Data Type Options" in the Advanced Options (Driver) dialog box. 6. The 2 setup dialog boxes have been made common, to make adding options easier. All the specific code that handles these dialog boxes has been moved to a module called "dlg_specific.c" and "dlg_specific.h". Thus it is much easier and less error-prone when adding new options. 7. With all the new options, you can make the new driver function like the old driver and libpq. By setting "Use Cursors" to false, and "Unknown Sizes" to "Longest", this will emulate that behavior. 8. Two new dialog boxes have been added for setting both Advanced Driver options and Datasource/Connection options. They are describe below: Advanced Options (Driver) Dialog Box ------------------------------------ - DEFAULTS button: Press to restore the normal defaults for the settings described below. - "Disable Genetic Optimizer": Automatically turns off the backend genetic optimizer at connection time. This is a convenience feature rather than having to type it in the connect settings. This feature was added when we noticed the backend seemed to have big problems optimizing some queries. - "CommLog (C:\psqlodbc.log)": Log communications to/from the backend to that file. This is good for debugging problems. - "Recognize Unique Indexes": This controls what SQLStatistics() will return about unique indexes. By default it is set to false. This setting allows Access 95 and 97 to ask the user at link time what the index should be. This is meant as a workaround until the backend canonifier can handle the Microsoft Access queries better. For some applications (i.e., Access 2.0), you must set this option to true to update any tables. - "ReadOnly (default)": New datasources will inherit the state of this box for the datasource readonly attribute. - "Use Cursors": If true (default), the driver automatically uses declare cursor/fetch to handle SELECT statements and keeps 100 rows in a cache. This is mostly a great advantage, especially if you are only interested in reading and not updating. It results in the driver not sucking down lots of memory to buffer the entire result set. If set to false, cursors will not be used and the driver will retrieve the entire result set. For very large tables, this is very inefficient and may use up all the Windows memory/resources. However, it may handle "updates" better since the tables are not kept open, as they are when using cursors. This was the style of the old podbc32 driver. However, the behavior of the memory allocation is much improved so even when not using cursors, performance should at least be better than the old podbc32. - "Unknown Sizes (Maximum/Dont Know/Longest)": This controls what SQLDescribeCol and SQLColAttributes will return as to precision for character data types (varchar, text, and unknown) in a result set. This is more of a workaround for Postgres not being able to return the defined column width of the varchar data type. - Maximum: always return the maximum precision of the data type. - Dont Know: return "Dont Know" value and let application decide. - Longest: return the longest string length of the column of any row. Beware of this setting when using cursors because the cache size may not be a good representation of the longest column in the cache. MS ACCESS: Seems to handle "Maximum" setting ok, as well as all the others. Borland: If sizes are large and lots of columns, Borland may crash badly (it doesnt seem to handle memory allocation well) if using "Maximum" size. - "Data Type Options": affects how some data types are mapped - Text as LongVarChar: Postgres TEXT type is mapped to SQLLongVarchar, otherwise SQLVarchar. - Unknowns as LongVarChar: Unknown types (arrays, etc) are mapped to SQLLongVarChar, otherwise SQLVarchar - "Cache Size": When using cursors, this is the row size of the tuple cache. If not using cursors, this is how many tuples to allocate memory for at any given time. The default is 100 rows for either case. - "Max Varchar": The maximum precision of the Varchar and BPChar(char[x]) types. The default is 254 which actually means 255 because of the null terminator. Note, if you set this value higher than 254, Access will not let you index on varchar columns! - "Max LongVarChar": The maximum precision of the LongVarChar type. Postgres Text type and unknown types will always report this size, regardless of the settings in "Data Type Options". This may be confusing slightly, but it does allow the flexibility of setting 2 distinct sizes. The default is 4094 which actually means 4095 with the null terminator. You can even specify (-4) for this size, which is the odbc SQL_NO_TOTAL value. - "Connect Settings": These commands will be sent to the backend upon a successful connection. Use a semi-colan (;) to separate commands. This can now handle any query, even if it returns results. The results will be thrown away however! Advanced Options ( OR Connection) Dialog Box -------------------------------------------------------- - "ReadOnly": Whether the datasource will allow updates. For new datsources, the default value comes from the Advanced Options (Driver) dialog box. - "6.2 Protocol": Forces driver to use Postgres 6.2 protocol, which had different byte ordering, protocol, and other semantics. - "Connect Settings": The driver sends these commands to the backend upon a successful connection. It sends these settings AFTER it sends the driver "Connect Settings". Use a semi-colan (;) to separate commands. This can now handle any query, even if it returns results. The results will be thrown away however!