IPrimaryPostgresSPLD.ServerCursorsDisabled

Syntax

ServerCursorsDisabled: Boolean;

Description

The ServerCursorsDisabled property determines whether server cursors are disabled during query execution.

Comments

Server cursors are objects that enable the user to get data from query results without overloading memory.

The ServerCursorsDisabled property affects the work of only databases and relational objects created in the repository. System queries created by the platform core always use server cursors. The property is set to False by default, and query is sent with the use of server cursor to get data to DBMS, for example:

SQL: DECLARE C1 CURSOR WITH HOLD FOR select a.ID,a.NAME from T_DATA a

SQL: FETCH FORWARD 10000 FROM C1

SQL: CLOSE C1

If the ServerCursorsDisabled property is set to True, server cursors will not be used, and the sent query will look as follows:

SQL: select a.ID,a.NAME from T_DATA a

Example

Executing the example requires that the repository contains a database with the DB_TEST identifier.

Add links to the Db and Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Db: IDatabase;
    LogonData: IPrimaryPostgresSPLD;
Begin
    Mb := MetabaseClass.Active;
    Db := Mb.ItemById("DB_TEST").Edit As IDatabase;
    LogonData := Db.LogonData As IPrimaryPostgresSPLD;
    // Disable server cursors
    LogonData.ServerCursorsDisabled := True;
    // Save changes 
    (Db As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, server cursors are disabled in the specified database.

See also:

IPrimaryPostgresSPLD