1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

This patch adds a new GUC var, "default_with_oids", which follows the

proposal for eventually deprecating OIDs on user tables that I posted
earlier to pgsql-hackers. pg_dump now always specifies WITH OIDS or
WITHOUT OIDS when dumping a table. The documentation has been updated.

Neil Conway
This commit is contained in:
Bruce Momjian
2003-12-01 22:08:02 +00:00
parent e7ca867485
commit 7ce9b7c0d8
18 changed files with 218 additions and 90 deletions

View File

@@ -1,5 +1,5 @@
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.17 2003/11/29 19:51:38 pgsql Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.18 2003/12/01 22:07:58 momjian Exp $
PostgreSQL documentation
-->
@@ -51,7 +51,20 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
<refsect1>
<title>Parameters</title>
<variablelist>
<varlistentry>
<term><literal>GLOBAL</literal> or <literal>LOCAL</literal></term>
<listitem>
<para>
Ignored for compatibility. Refer to <xref
linkend="sql-createtable" endterm="sql-createtable-title"> for
details.
</para>
</listitem>
</varlistentry>
</variablelist>
<variablelist>
<varlistentry>
<term><literal>TEMPORARY</> or <literal>TEMP</></term>
@@ -105,10 +118,24 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
<title>Notes</title>
<para>
This command is functionally equivalent to <xref
linkend="sql-selectinto" endterm="sql-selectinto-title">, but it is preferred since it is less
likely to be confused with other uses of the <command>SELECT
... INTO</command> syntax.
This command is functionally similar to <xref
linkend="sql-selectinto" endterm="sql-selectinto-title">, but it is
preferred since it is less likely to be confused with other uses of
the <command>SELECT INTO</command> syntax.
</para>
<para>
Prior to PostgreSQL 7.5, <command>CREATE TABLE AS</command> always
included OIDs in the table it produced. Furthermore, these OIDs
were newly generated: they were distinct from the OIDs of any of
the rows in the source tables of the <command>SELECT</command> or
<command>EXECUTE</command> statement. Therefore, if <command>CREATE
TABLE AS</command> was frequently executed, the OID counter would
be rapidly incremented. As of PostgreSQL 7.5, the inclusion of OIDs
in the table generated by <command>CREATE TABLE AS</command> is
controlled by the <varname>default_with_oids</varname> configuration
variable. This variable currently defaults to true, but will likely
default to false in a future release of <productname>PostgreSQL</>.
</para>
</refsect1>
@@ -129,7 +156,6 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name
<simplelist type="inline">
<member><xref linkend="sql-createtable" endterm="sql-createtable-title"></member>
<member><xref linkend="sql-createview" endterm="sql-createview-title"></member>
<member><xref linkend="sql-execute" endterm="sql-execute-title"></member>
<member><xref linkend="sql-select" endterm="sql-select-title"></member>
<member><xref linkend="sql-selectinto" endterm="sql-selectinto-title"></member>