IDatabase.SupportBinaryProtocol

Syntax

SupportBinaryProtocol: Boolean;

Description

The SupportBinaryProtocol property determines whether binary queries will be used to work with PostgreSQL server.

Comments

The property is relevant if the database connects to a server based on PostgreSQL DBMS.

Available values:

NOTE. Binary queries can be used if PostgreSQL 9.3 or later is used at DBMS server.

Example

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    DB: IDatabase;
    LogonData: IPrimaryPostgresSPLD;
Begin
    MB := MetabaseClass.Active;
    //Information about created object
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_DATABASE;
    CrInfo.Id := "POSTGRESQL_DB";
    CrInfo.Name := "PostgreSQL database";
    CrInfo.Parent := MB.Root;
    //Create a new database and set up properties
    DB := MB.CreateObject(CrInfo).Edit As IDatabase;
    DB.Authentication := AuthenticationMode.Password;
    DB.DriverId := "POSTGRES";
    DB.SupportBinaryProtocol := True;
    LogonData := DB.LogonData As IPrimaryPostgresSPLD;
    LogonData.Server := "Server";
    LogonData.Database := "PPTest";
    //Save
    (DB As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a new database is created in the repository root directory. The database will connect to the specified schema located at PostgreSQL server. Binary queries will be used when addressing to the server.

See also:

IDatabase