Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6533062

Browse filesBrowse files
committed
doc: Clarify status of SELECT INTO on reference page
The documentation as well as source code comments weren't entirely clear whether SELECT INTO was truly deprecated (thus in theory destined to be removed eventually), or just a less recommended variant. After discussion, it appears that other implementations also use SELECT INTO in direct SQL in a way similar to PostgreSQL, so it seems worth keeping it for compatibility. Update the language in the documentation to that effect. Discussion: https://www.postgresql.org/message-id/flat/96dc0df3-e13a-a85d-d045-d6e2c85218da%40enterprisedb.com
1 parent 6aaaa76 commit 6533062
Copy full SHA for 6533062

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎doc/src/sgml/ref/select_into.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ref/select_into.sgml
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ SELECT * INTO films_recent FROM films WHERE date_prod >= '2002-01-01';
138138
in <application>ECPG</application> (see <xref linkend="ecpg"/>) and
139139
<application>PL/pgSQL</application> (see <xref linkend="plpgsql"/>).
140140
The <productname>PostgreSQL</productname> usage of <command>SELECT
141-
INTO</command> to represent table creation is historical. It is
142-
best to use <command>CREATE TABLE AS</command> for this purpose in
143-
new code.
141+
INTO</command> to represent table creation is historical. Some other SQL
142+
implementations also use <command>SELECT INTO</command> in this way (but
143+
most SQL implementations support <command>CREATE TABLE AS</command>
144+
instead). Apart from such compatibility considerations, it is best to use
145+
<command>CREATE TABLE AS</command> for this purpose in new code.
144146
</para>
145147
</refsect1>
146148

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.