This is a list of the standard Driver Parameters supported by the pgExpress Driver (please check your Delphi help on Driver Parameters for more information on each of them).
Table 2.2. Driver Parameters
Used also to provide Special Params to the pgExpress Driver. This parameter can also be used as
an URL for providing extra host and port info:
host:port/databasePlease check the Installation section for more details.
|Password||See also the Authentication section.|
|BlobSize||This parameter is actually ignored, since PostgreSQL can report the exact Blob field size.|
|LocaleCode||See also the Multibyte, UNICODE and Locales section.|
|RowsetSize||Only works if the BlockRead param is True.|
Name can instead be specified as a member of the |
Will set a PostgreSQL7.3+ schema (namespace) to log in.
Please check here
for more details. Multiple Schemas can be specified (just as in PostgreSQL) if separated by
collons, such as:
RoleName = public,schema1,schema2
|ServerCharset||See also Multibyte, UNICODE and Locales.|
This param allows to supply Special Params through
a way other then the traditional, i.e. after the
Allows setting the port to connect to. D7+ only.
Can instead be specified as a member of the
|BlockingMode||If False, asynchronous connections will be used to connect to the server.|
|Decimal Separator||Same as ServerDecimalSeparator, but since BDS 2006, it is also supported as a regular dbExpress parameter. It will not work with applications built with older IDEs.|
dbExpress applications (BDS 2006+), support a custom connection string, that will be passed directly to
Allows to set the language resource file for the driver. Please refer to
Multilanguage Driver section for more details.
The behavior for this parameter has changed on pgExpress v3.0. To get the same behavior as the v2.X series, check the Language.
|Trim Char||When True, trailing space chars CHAR fields will be trimmed. VCL/CLX default is False.|
The pgExpress Driver has a few special parameters that can be used to customize its behaviors; we refer to them as "Special Params". Default values are formatted like this.
To set a special param, add it in your
dbxconnections(.ini) file after the database parameter, such as:
[PGEConnection] Database=localhost/template1,TextAsMemo=False,ByteaMode=asVarBytes ...
Table 2.3. Special Params
If True, the PostgreSQL TEXT fields will be mapped as Blob
(Memo); if False (default), it will be mapped as String. A
VARCHAR field with no length specifier behaves exactly like a TEXT field.
Obs:If mapped as string, a TEXT field will be padded at the maximum string length imposed by dbExpress (~32Kb).
|This special param has been deprecated and will be ignored as of pgExpress 4.0. Please refer to BorlandCompatible for a better solution.|
|If True, unknown/unsupported field types such as point will be mapped as strings.|
|If True, arrays will be mapped as strings. If False, they will be ignored (hidden).|
This parameter controls to which type the bytea fields get mapped.
Check Bytea fields as BLOBs for more details. For compatibility with
If True, quote objects names. To this setting to take effect, the connection must be reopened
(if already opened of course). An example of unquoted and quoted query:
Example 2.1. Quoted and unquoted queries
select typname from pg_type; -- unquoted version select "typname" from "pg_type"; -- quoted version
Please note that quoted objects names are case sensitive for PostgreSQL. The query above written like this would fail:
This setting will control how often the types from PostgreSQL will be loaded and mapped into
VCL/CLX types. Of course the less times they are loaded, the faster the application
will be. The default setting should be OK for most applications (unless you do types
Obs:The PostgreSQL database has a flexible types support; that means we must retrieve the types information before we know what each type name means. This information is retrieved from the pg_type catalog and then mapped into actual dbExpress/VCL types by the pgExpress driver. Please refer to your PostgreSQL documentation for more details.
If True, will retrieve extra information about the fields in a table (for single
table queries). That will allow the pgExpress Driver to determine if a field can be null
The pgExpress Driver should automatically detect your locale settings and use the appropriate decimal separator. However, if you want to force some specific value, this options is available. Set it to the char you want to be the decimal separator (usually either "." or ",").
However, since the
ServerDecimalSeparator = \,
ServerDecimalSeparator = .
See also ServerDecimalSeparator.
If True, the pgExpress Driver will use Fetch Cursors to
retrieve the records from the server.
It is required to use this parameter to read the records in blocks since the pgExpress Driver will have to use a totally different method to retrieve the records from the server. Please refer to the section for more details.
If True, the pgExpress Driver will return qualified names on metadata retrieving, such as public.MyTable, pg_catalog.abstime, etc.
This option will only work PostgreSQL 7.3 which supports schemas.
|Controls which metadata is retrieved. If True, only objects in the current namespace search path will be retrieved. If False, all objects will be retrieved, regardless of which namespace they are in.|
If True, will only make a connection to the server in SSL mode. This option
will only work with a SSL enabled |
If True, the pgExpress Driver will return the OID
field in the list of fields for a table
See also this FAQ entry on OIDs usage with pgExpress.
Allows to specify connection timeouts (|
If True, the pgExpress Driver will automatically try to detect if the connection has been broken
and recover it automatically and continue processing. If it is sucessful, the whole operation
is fully transparent to the user. If not, an appropriate error message will be displayed.
NoteThis feature is avaiable only on the registered version of the driver.
Controls the Retaining Cursors behavior.
If True, the pgExpress Driver will retain the cursor for the previous SELECT statement and return it if a previous dataset record is acessed again, instead of running the whole query again (dbExpress behavior). No matter how many times the same query is run again, always the same result set is returned (from the internal cache).
NoteThis setting will be ignored if Fetch Cursors are being used.
|If True, the pgExpress Driver will allow Blob (Large Objects) writes. Blob writing is a delicate issue; just activate this setting if you read Section 6.7.1, “Large Objects (BLOBs)”. Registered users only.|
If True, the pgExpress Driver will log (into
An example of unfiltered output (LogDeclareFetch=False):
Starting transaction for DECLARE/FETCH Starting transaction >> BEGIN; >> DECLARE pgeCursor CURSOR for select * from pg_type; >> FETCH 50 FROM pgeCursor >> FETCH 50 FROM pgeCursor >> FETCH 50 FROM pgeCursor >> FETCH 50 FROM pgeCursor >> FETCH 50 FROM pgeCursor Closing cursor pgeCursor >> CLOSE pgeCursor Ending DECLARE/FETCH transaction Rolling back transaction >> ROLLBACK;
The same operation, but filtered (LogDeclareFetch=True):
>> BEGIN; Rolling back transaction >> ROLLBACK;
Registered users only since depends on Section 6.2, “Fetch Cursors”
|Language||(none)||If empty, the pgExpress Driver will assume the language to be used is English. Otherwise, it is one of the entries of the Supported languages table table.|
|Borland Compatible||False||If True, the pgExpress Driver will try to be more compatible with the behavior of Codegear dbExpress drivers, mapping NUMERIC values like Codegear does.|
If True, the pgExpress Driver will map string (CHAR,
VARCHAR, TEXT) fields
This parameter is only meaningful for dbExpress protocol 3.0 and later applications, whose can map to
If True, the pgExpress Driver will get into dbExpress 4 compatibility mode. Among other things,
NUMERIC/DECIMAL fields will be mapped as TBcdField instead of
TFMTBcdField. Please read ??? for further information.
This parameter is only meaningful for dbExpress protocol 3.0 and later applications, running under dbExpress 4.
On older pgExpress Driver versions, these parameters used go into the
dbxdrivers(.ini) file. But since version 1.5, they go
Database parameter in the
separated by commas. On Delphi 7 or later, they can also go on the
Custom String parameter.
Example 2.2. Special Parameters usage
[OfficeServer] Database = sales,TextAsMemo = False, Int8Mode = AsString [PGEConnection] Database = sales, ArrayAsString = False, QuoteObjects = True, GetExtendedFieldsInformation = False
On Delphi 7, using the new
section (works the same way as above, but this section was made for using with special
Example 2.3. Special parameters usage with the
Custom String param
[PGEConnection] Database = sales Custom String = ArrayAsString = False, QuoteObjects = True, GetExtendedFieldsInformation = False
If you don't want to use any special parameters (as most users will), specify the Database parameter alone, normally:
[OfficeServer] Database = sales
Of course these parameters could also go in the
property as any other
SQLConnection1.Params.Add('Database = sales,TextAsMemo = False,Int8Mode = AsString');
Or on Delphi 7, using the new
SQLConnection1.Params.Add('Custom String = ArrayAsString = False, QuoteObjects = True, GetExtendedFieldsInformation = False ');
Unhappily, due to the way dbExpress was designed on Delphi 6 and
, there can't be real custom parameters from VCL/CLX to the driver, so misusing
Database parameter was a “hack” that
we had to do to allow custom params. Even on Delphi 7 only a
single Custom parameter (“Custom String”) can be specified.
"Custom Info" are methods that can be used to retrieve information from the driver that otherwise
could not be retrieved. They will only work with Delphi 7 or newer which
For easy implementation of these interfaces, please use the corresponding functions from the
Table 2.4. Custom Info Interfaces
|GetPGVersion||Returns the PostgreSQL server version as a float.||GetPGVersion|
|TTY||Allows setting or retrieving file or TTY for optional debug output from the backend server. Set before connecting.||GetTTY|
|BackendPID||Will retrieve the PID of the process of the connection in the backend server.||GetBackendPID|
Will return ||GetOnline|