From 82f9247779658915fe0e57a8797622483de7e4c3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 9 Dec 2020 21:35:14 +0100 Subject: [PATCH v2 2/2] 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 --- doc/src/sgml/ref/select_into.sgml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml index 7b327d9eee..acc6401485 100644 --- a/doc/src/sgml/ref/select_into.sgml +++ b/doc/src/sgml/ref/select_into.sgml @@ -138,9 +138,11 @@ Compatibility in ECPG (see ) and PL/pgSQL (see ). The PostgreSQL usage of SELECT - INTO to represent table creation is historical. It is - best to use CREATE TABLE AS for this purpose in - new code. + INTO to represent table creation is historical. Some other SQL + implementations also use SELECT INTO in this way (but + most SQL implementations support CREATE TABLE AS + instead). Apart from such compatibility considerations, it is best to use + CREATE TABLE AS for this purpose in new code. -- 2.29.2