diff options
author | Tom Lane | 2012-06-13 21:48:42 +0000 |
---|---|---|
committer | Tom Lane | 2012-06-13 21:48:42 +0000 |
commit | c3bc76bdb0ac600e6b4d1e594e1a077c1efc5154 (patch) | |
tree | ca6f13e7a4abe94d6edd10efb89c8961be609bd8 /doc/src | |
parent | 93f4d7f806613d28842f956a84f31cc41d825503 (diff) |
Deprecate use of GLOBAL and LOCAL in temp table creation.
Aside from adjusting the documentation to say that these are deprecated,
we now report a warning (not an error) for use of GLOBAL, since it seems
fairly likely that we might change that to request SQL-spec-compliant temp
table behavior in the foreseeable future. Although our handling of LOCAL
is equally nonstandard, there is no evident interest in ever implementing
SQL modules, and furthermore some other products interpret LOCAL as
behaving the same way we do. So no expectation of change and no warning
for LOCAL; but it still seems a good idea to deprecate writing it.
Noah Misch
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/create_table.sgml | 20 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_table_as.sgml | 5 |
2 files changed, 16 insertions, 9 deletions
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index a52bfad2f3d..d329388bb9a 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -163,7 +163,8 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI <para> Optionally, <literal>GLOBAL</literal> or <literal>LOCAL</literal> can be written before <literal>TEMPORARY</> or <literal>TEMP</>. - This makes no difference in <productname>PostgreSQL</>, but see + This presently makes no difference in <productname>PostgreSQL</> + and is deprecated; see <xref linkend="sql-createtable-compatibility" endterm="sql-createtable-compatibility-title">. </para> @@ -1304,13 +1305,20 @@ CREATE TABLE employees OF employee_type ( </para> <para> - The standard's distinction between global and local temporary tables - is not in <productname>PostgreSQL</productname>, since that distinction - depends on the concept of modules, which - <productname>PostgreSQL</productname> does not have. + The SQL standard also distinguishes between global and local temporary + tables, where a local temporary table is only visible within a specific + SQL module, though its definition is still shared across sessions. Since + <productname>PostgreSQL</productname> does not support SQL modules, this + distinction is not relevant in <productname>PostgreSQL</productname>. + </para> + + <para> For compatibility's sake, <productname>PostgreSQL</productname> will accept the <literal>GLOBAL</literal> and <literal>LOCAL</literal> keywords - in a temporary table declaration, but they have no effect. + in a temporary table declaration, but they currently have no effect. + Use of these keywords is discouraged, since future versions of + <productname>PostgreSQL</productname> might adopt a more + standard-compliant interpretation of their meaning. </para> <para> diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml index 1be9f4d1f6a..29d161940c7 100644 --- a/doc/src/sgml/ref/create_table_as.sgml +++ b/doc/src/sgml/ref/create_table_as.sgml @@ -62,9 +62,8 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE <replaceable <term><literal>GLOBAL</literal> or <literal>LOCAL</literal></term> <listitem> <para> - Ignored for compatibility. Refer to <xref - linkend="sql-createtable"> for - details. + Ignored for compatibility. Use of these keywords is deprecated; + refer to <xref linkend="sql-createtable"> for details. </para> </listitem> </varlistentry> |