EPUB | CHM | PDF

TPSQLDatabase.Methods.ReloadGUC

Top Previous Next

Reloads GUC (Grand Unified Configuration) values from to the server.

Syntax:

procedure ReloadGUC;

Description:

This function will reload GUC values from the server. There are many configuration parameters that affect the behavior of the database system and  communication to it. Needed parameters are fetched at the connection start up. One should execute this method if any changes were made during session, e.g. SET bytea_output = 'escape'.

Before calling ReloadGUC, TPSQLDatabase must be Connected to server. This means that TPSQLDatabase.Open method was called before, or property Connected was set to True. 

Example:

This example shows how to change some parameters and then reload values locally:

procedure TForm1.ChangeSomeGUC();
begin
  PSQLQuery1.SQL.Text := 'SET standard_conforming_strings=on;';
  PSQLQuery1.ExecSQL;
  PSQLQuery1.SQL.Text := 'SET bytea_output = ''escape'';';
  PSQLQuery1.ExecSQL;
  PSQLDatabase1.ReloadGUC();
end;