Chapter 6. Notes

1. Known Issues

  • Int8 fields couldn't be properly supported in the past because dbExpress itself do not support them. The pgExpress Driver has a workaround for this by using a hack discovered by Peter Sawatzki ( that allows native use of the Int8 type. Older ( 1.X) versions of the pgExpress Driver had option to remap Int8 fields as Bcd, Strings, Int4 or letting them as Unknown type. For compatibility reasons, these options are still available but the new default behavior on 2.X+ is mapping them as Int8 using the mentioned hack.

    Those who want the old behavior for compatibily reasons, use the Special Param Int8Mode = AsBCD.

  • The driver won't automatically retrieve the IsAutoIncrement() and IsNullable() interfaces unless you set the Special Param GetExtendedFieldsInformation. This is done to reduce an extra query overhead that would be necessary otherwise.

    You can always set these values directly in the TFields manually, of course.

  • The driver can't log the disconnection event because the VCL clears the pointer to the TSQLMonitor callback function before disconnecting, through a SQLConnection.SetOption() call.

  • Arrays support is provided by mapping them as strings (i.e., the same way PostgreSQL returns them). This is a delicated issue; arrays in PostgreSQL always have variable length, regardless of what is declared in the table definition (that is for documentation only). For instance, the following code is legal (psql 's output):

    test=#  create table array_test(a integer[2]); /*Declare a table with an array' */
    test=# insert into array_test values ('{1,2,3,4,5,6,7,8,9}');
    INSERT 7500763 1
    test=# select * from array_test;
    (1 row)

  • ADTs can't be properly supported under current dbExpress implementation.

  • The pgExpress Driver was not tested in older (previous to 7.1) versions of PostgreSQL. If you test it on some older version, please tell us your impressions.

  • Since the VCL/CLX parses the colons (':') as being parameter delimiters, you need to use double colons in SQL syntax (or scape them with backslashes). Colons are used to do typecasts, as in the following code:

    select typelem::::int4 from pg_type; /*Instead of 'select typelem::int4 from pg_type;' */

    You can use the cast() function similary:

    select cast(typelem as integer) from pg_type;