From ea01a451ccec55cada68cb45a54519a750fd3d60 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 11 Jun 2002 15:44:38 +0000 Subject: Implement SQL99 OVERLAY(). Allows substitution of a substring in a string. Implement SQL99 SIMILAR TO as a synonym for our existing operator "~". Implement SQL99 regular expression SUBSTRING(string FROM pat FOR escape). Extend the definition to make the FOR clause optional. Define textregexsubstr() to actually implement this feature. Update the regression test to include these new string features. All tests pass. Rename the regular expression support routines from "pg95_xxx" to "pg_xxx". Define CREATE CHARACTER SET in the parser per SQL99. No implementation yet. --- doc/src/sgml/ref/set.sgml | 378 +++++++++++++++++++++++----------------------- 1 file changed, 186 insertions(+), 192 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/set.sgml b/doc/src/sgml/ref/set.sgml index 65ff6eca29f..5ccb3a7a0df 100644 --- a/doc/src/sgml/ref/set.sgml +++ b/doc/src/sgml/ref/set.sgml @@ -1,5 +1,5 @@ @@ -28,8 +28,8 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone Specifies that the command takes effect for the current session. - (This is the default if neither @@ -39,11 +39,11 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone 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's - executed outside a BEGIN block, since the transaction - will end immediately. + transaction. After COMMIT or ROLLBACK, + the session-level setting takes effect again. Note that + SET LOCAL will appear to have no effect if it's + executed outside a BEGIN block, since the transaction + will end immediately. @@ -112,7 +112,6 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone - DATESTYLE @@ -126,44 +125,44 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone - - ISO - - - Use ISO 8601-style dates and times (YYYY-MM-DD - HH:MM:SS). This is the default. + + ISO + + + Use ISO 8601-style dates and times (YYYY-MM-DD + HH:MM:SS). This is the default. - - + + - SQL - - - Use Oracle/Ingres-style dates and times. Note that this - style has nothing to do with SQL (which mandates ISO 8601 - style), the naming of this option is a historical accident. - - - + SQL + + + Use Oracle/Ingres-style dates and times. Note that this + style has nothing to do with SQL (which mandates ISO 8601 + style), the naming of this option is a historical accident. + + + - PostgreSQL - - - Use traditional PostgreSQL format. - - - + PostgreSQL + + + Use traditional PostgreSQL format. + + + - German - - - Use dd.mm.yyyy for numeric date representations. - - - + German + + + Use dd.mm.yyyy for numeric date representations. + + + @@ -173,24 +172,24 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezone - - European - - - Use dd/mm/yyyy for numeric date representations. - - - + + European + + + Use dd/mm/yyyy for numeric date representations. + + + - NonEuropean - US - - - Use mm/dd/yyyy for numeric date representations. - - - + NonEuropean + US + + + Use mm/dd/yyyy for numeric date representations. + + + @@ -214,23 +213,23 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezoneSET or a configuration-file entry: - - Setting the postmaster's PGDATESTYLE environment - variable. (This will be overridden by any of the other methods.) - - - Running postmaster using the option to - select the European conventions. - (This overrides environment variables and configuration-file - entries.) - - - Setting the client's PGDATESTYLE environment variable. - If PGDATESTYLE is set in the frontend environment of a client - based on libpq, libpq will automatically set DATESTYLE to the - value of PGDATESTYLE during connection start-up. This is - equivalent to a manually issued SET. - + + Setting the postmaster's PGDATESTYLE environment + variable. (This will be overridden by any of the other methods.) + + + Running postmaster using the option to + set dates to the European convention. + (This overrides environment variables and configuration-file + entries.) + + + Setting the client's PGDATESTYLE environment variable. + If PGDATESTYLE is set in the frontend environment of a client + based on libpq, libpq will automatically set DATESTYLE to the + value of PGDATESTYLE during connection start-up. This is + equivalent to a manually issued SET DATESTYLE. + @@ -250,50 +249,49 @@ SET [ SESSION | LOCAL ] TIME ZONE { timezoneSEED - Sets the internal seed for the random number generator. + Sets the internal seed for the random number generator. - - - value - - - The value for the seed to be used by the - random function. Allowed - values are floating-point numbers between 0 and 1, which - are then multiplied by 231-1. - - - - - + + + value + + + The value for the seed to be used by the + random function. Allowed + values are floating-point numbers between 0 and 1, which + are then multiplied by 231-1. + + + + + - - The seed can also be set by invoking the - setseed SQL function: + + The seed can also be set by invoking the + setseed SQL function: - + SELECT setseed(value); - - - - - + + + + - - SERVER_ENCODING - - - Shows the server-side multibyte encoding. (At present, this - parameter can be shown but not set, because the encoding is - determined at initdb time.) - - - + + SERVER_ENCODING + + + Shows the server-side multibyte encoding. (At present, this + parameter can be shown but not set, because the encoding is + determined at initdb time.) + + + - - TIME ZONE - TIMEZONE - + + TIME ZONE + TIMEZONE + Sets the default time zone for your session. Arguments can be an SQL time interval constant, an integer or double precision @@ -301,92 +299,88 @@ SELECT setseed(value); by the host operating system. - - The available time zone names depend on your operating - system. For example, on Linux - /usr/share/zoneinfo contains the database - of time zones. - - - Here are some typical values for time zone names: + + Here are some typical values for time zone settings: - - 'PST8PDT' - - - Set the time zone for California. - - - - - 'Portugal' - - - Set the time zone for Portugal. - - - - - 'Europe/Rome' - - - Set the time zone for Italy. - - - - - + + 'PST8PDT' + + + Set the time zone for Berkeley, California. + + + + + 'Portugal' + + + Set the time zone for Portugal. + + + + + 'Europe/Rome' + + + Set the time zone for Italy. + + + + + 7 + + + Set the time zone to 7 hours offset west from GMT (equivalent + to PDT). + + + + + INTERVAL '08:00' HOUR TO MINUTE + + + Set the time zone to 8 hours offset west from GMT (equivalent + to PST). + + + + + LOCAL + DEFAULT + + + Set the time zone to your local time zone (the one that + your operating system defaults to). + + + + + - - In addition to time zone names, PostgreSQL - accepts these other methods of specifying a time zone: + + The available time zone names depend on your operating + system. For example, on Linux + /usr/share/zoneinfo contains the database + of time zones; the names of the files in that directory can be + used as parameters to this command. + - - - 7 - - - Set the time zone to 7 hours offset west from GMT (equivalent - to PDT). - - - - - INTERVAL '08:00' HOUR TO MINUTE - - - Set the time zone to 8 hours offset west from GMT (equivalent - to PST). - - - - - LOCAL - DEFAULT - - - Set the time zone to your local time zone (the one that - your operating system defaults to). - - - - - - - If an invalid time zone name is specified, the time zone - becomes GMT (on most systems anyway). - - - If the PGTZ environment variable is set in the frontend - environment of a client based on libpq, libpq will automatically - set TIMEZONE to the value of PGTZ during connection start-up. - - - + + If an invalid time zone is specified, the time zone + becomes GMT (on most systems anyway). + - - + + If the PGTZ environment variable is set in the frontend + environment of a client based on libpq, libpq will automatically + SET TIMEZONE to the value of + PGTZ during connection start-up. + + + + + Use to show the -- cgit v1.2.3