Changing the value of a Greenplum Database configuration parameter using "set" command

posted Apr 29, 2013, 5:26 AM by Sachchida Ojha   [ updated Nov 5, 2014, 2:47 PM ]
The gadget spec URL could not be found
SET command changes the value of a Greenplum Database configuration parameter.

SET [SESSION | LOCAL] configuration_parameter {TO | =} value |'value' | DEFAULT}
SET [SESSION | LOCAL] TIME ZONE {timezone | LOCAL | DEFAULT}

The SET command changes server configuration parameters. Any configuration parameter classified as a session parameter can be changed on-the-fly with SET. SET affects only the value used by the current session. If SET or SET SESSION is issued within a transaction that is later aborted, the effects of the SET command disappear when the transaction is rolled back. Once the surrounding transaction is committed, the effects will persist until the end of the session, unless overridden by another SET.

The effects of SET LOCAL last only till the end of the current transaction, whether committed or not. A special case is SET followed by SET LOCAL within a single transaction: the SET LOCAL value will be seen until the end of the transaction, but afterwards (if the transaction is committed) the SET value will take effect.
The gadget spec URL could not be found
Parameters

SESSION: Specifies that the command takes effect for the current session. This is the default.
LOCAL: Specifies that the command takes effect for only the current transaction. After COMMIT or ROLLBACK, the session-level setting takes effect again. Note that SET
LOCAL will appear to have no effect if it is executed outside of a transaction.
configuration_parameter: The name of a Greenplum Database configuration parameter. Only parameters classified as session can be changed with SET.
value: New value of parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these. DEFAULT can be used to specify
resetting the parameter to its default value. If specifying memory sizing or time units, enclose the value in single quotes.
TIME ZONE: SET TIME ZONE value is an alias for SET timezone TO value. The syntax SET TIME ZONE allows special syntax for the time zone specification. Here are examples
of valid values:
'PST8PDT'
'Europe/Rome'
-7 (time zone 7 hours west from UTC)
INTERVAL '-08:00' HOUR TO MINUTE (time zone 8 hours west from UTC).
LOCAL
DEFAULT
Set the time zone to your local time zone (the one that the server’s operating system
defaults to).

For examples
The gadget spec URL could not be found
Set the schema search path:
SET search_path TO my_schema, public;

Increase work memory to 200 MB:
SET work_mem TO '200MB';

Set the style of date to traditional POSTGRES with “day before month” input convention:
SET datestyle TO postgres, dmy;

Set the time zone for San Mateo, California:
SET TIME ZONE 'PST8PDT';

Set the time zone for Italy:
SET TIME ZONE 'Europe/Rome';




The gadget spec URL could not be found
Comments