Meet the PostgresDAC v3.0.0
Posted on 2015-03-04 by Microolap
We've released our new major version of PostgresDAC component suite. It’s been a long way started almost two years ago. The goals were complicated, and not all of them were accomplished. However, in general we may proudly say without a doubt that this release is a significant milestone.
Dump and restore functionality
TPSQLDump and TPSQLRestore components is a pair that is one of a kind on the whole market. There are no more such facilities not only in the Delphi or C Builder world, but for any other IDE's or toolchains. That is why our first goal was to keep this classes up to date. A huge amount of work was done and a year ago the brand new v3 TPSQLDump and TPSQLRestore components were published as part of v2.11.0 release.
TPSQLDump and TPSQLRestore are fully compatible with native pg_dump and pg_restore utilities. Each and every native feature is supported out of the box:
- output formats (binary, text, directory, gzipped),
- parallel dumping and restoring,
- comprehensive selection, filtering and reordering of archived items,
- SQL-92 specific output options, etc.
Asynchronous Fetch-On-Demand mode
The default TPSQLQuery's mode is suitable for submitting commands and getting result sets in normal, synchronous applications. However, there are few drawbacks, that may be of importance to developers:
- TPSQLQuery.Open waits for the command to be completed. The application might have other work to do (such as maintaining a user interface), in which case it won’t be a good decision to block while waiting for a response.
- Since the execution of the client application is suspended while it waits for the result, it is hard for the application to decide that it would like to try to cancel the ongoing command.
- TPSQLQuery in default mode always collects a command's entire result, buffering it in a single place. While this behavior simplifies some internal logic, it can be impractical for results containing many rows.
To avoid such limitations developers now can use the brand new Fetch-On-Demand mode, which is turned on by dsoFetchOnDemand option in the TPSQLQuery.Options set. There are limitations of course:
- To get advantages of the Fetch-On-Demand mode one should use read-only TPSQLQuery objects. This restriction will be removed with time probably.
- Each read-only TPSQLQuery component must have its separate TPSQLDatabase component since Fetch-On-Demand command flow will block a connection until getting the last row of the result set.
Support for built-in range and geometric field types
Previously these specific types were mapped to TStringField class. Now PostgresDAC provides new TField descendants for this:
- TPSQLRangeField
- TPSQLPointField
- TPSQLCircleField
- TPSQLBoxField
- TPSQLLSegField
All of them will be created automatically if needed, or may be added manually in design time.
TPSQLRangeField encapsulates all built-in PostgreSQL range types: int4range, int8range, numrange, tsrange, tstzrange and daterange. Information about range value is stored in the TPSQLRange record by storing values for each bound using TPSQLRangeBound record. Depending on the underlying table field type developer may access bound values using appropriate methods AsInteger, AsFloat, etc.
Enhanced Manual
We've finished the new help system. It's rewritten it from scratch. Support for such formats provided:
- chm,
- pdf.
- epub (in progress).
Full changelog:
- [!] Fetch-On-Demand mode introduced for readonly TPSQLQuery objects
- [!] Support for geometric types added
- [!] TPSQLRangeField added
- [!] Support for pre-8.0 PostgreSQL servers is discontinued
- [!] v9.4.0 client libraries added
- [!] v9.4.0 dump & restore libraries (pg_dump.dll, pg_restore.dll) added
- [*] Components TPSQLUser and TBDE2PSQLDAC marked as deprecated and will be removed shortly
- [*] EPSQLDatabaseError is raised if TPSQLDatabase is used in non-exclusive mode for TPSQLQuery with dsoFetchOnDemand
- [*] TPSQLDatabase.CancelBackend checks for connection now to prevent AV
- [-] "AV may occur if SQL parameter name consists from incorrect characters chain" bug fixed
- [-] "EPSQLDatabaseError detail error properties are empty after error in TPSQLDirectQuery.Open" bug fixed
Download
You're welcome to download the PostgresDAC v3.0.0 right now at:
http://microolap.com/products/connectivity/postgresdac/download/ or login to your private area on our site at
http://microolap.com/my/downloads/
Feedback
Please don't hesitate to ask any questions or report bugs with our Support Ticketing system available at
http://www.microolap.com/support/