Postgres Plus Advanced Server Oracle Compatibility Developer's Guide :

Previous PageTable Of ContentsNext Page

3.3.4 ALTER SESSION

Name

ALTER SESSION  --  change a runtime parameter

Synopsis

ALTER SESSION SET name = value

Description

The ALTER SESSION command changes runtime configuration parameters. ALTER SESSION only affects the value used by the current session. Some of these parameters are provided solely for Oracle syntax compatibility and have no effect whatsoever on the runtime behavior of Postgres Plus Advanced Server. Others will alter a corresponding Postgres Plus Advanced Server database server runtime configuration parameter.

Parameters

name

Name of a settable runtime parameter. Available parameters are listed below.

value

New value of parameter.

Configuration Parameters

The following configuration parameters can be modified using the ALTER SESSION command:

NLS_DATE_FORMAT (string)

Sets the display format for date and time values as well as the rules for interpreting ambiguous date input values. Has the same effect as setting the Postgres Plus Advanced Server datestyle runtime configuration parameter.

NLS_LANGUAGE (string)

Sets the language in which messages are displayed. Has the same effect as setting the Postgres Plus Advanced Server lc_messages runtime configuration parameter.

NLS_LENGTH_SEMANTICS (string)

Valid values are BYTE and CHAR. The default is BYTE. This parameter is provided for syntax compatibility only and has no effect in Postgres Plus Advanced Server.

OPTIMIZER_MODE (string)

Sets the default optimization mode for queries. Valid values are ALL_ROWS, CHOOSE, FIRST_ROWS, FIRST_ROWS_10, FIRST_ROWS_100, and FIRST_ROWS_1000. The default is CHOOSE. This parameter is implemented in Postgres Plus Advanced Server. See Section 0 for more information.

QUERY_REWRITE_ENABLED (string)

Valid values are TRUE, FALSE, and FORCE. The default is FALSE. This parameter is provided for syntax compatibility only and has no effect in Postgres Plus Advanced Server.

QUERY_REWRITE_INTEGRITY (string)

Valid values are ENFORCED, TRUSTED, and STALE_TOLERATED. The default is ENFORCED. This parameter is provided for syntax compatibility only and has no effect in Postgres Plus Advanced Server.

Examples

Set the language to U.S. English in UTF-8 encoding. Note that in this example, the value, en_US.UTF-8, is in the format that must be specified for Postgres Plus Advanced Server. This form is not Oracle compatible.

ALTER SESSION SET NLS_LANGUAGE = 'en_US.UTF-8';

Set the date display format.

ALTER SESSION SET NLS_DATE_FORMAT = 'dd/mm/yyyy';

Previous PageTable Of ContentsNext Page