SELECT INTO deprecation

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: SELECT INTO deprecation
Date: 2020-12-02 11:54:48
Message-ID: 96dc0df3-e13a-a85d-d045-d6e2c85218da@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

While reading about deprecating and removing various things in other
threads, I was wondering about how deprecated SELECT INTO is. There are
various source code comments about this, but the SELECT INTO reference
page only contains soft language like "recommended". I'm proposing the
attached patch to stick a more explicit deprecation notice right at the top.

I also found some gratuitous uses of SELECT INTO in various tests and
documentation (not ecpg or plpgsql of course). Here is a patch to
adjust those to CREATE TABLE AS.

I don't have a specific plan for removing top-level SELECT INTO
altogether, but there is a nontrivial amount of code for handling it, so
there would be some gain if it could be removed eventually.

Attachment Content-Type Size
0001-Remove-gratuitous-uses-of-deprecated-SELECT-INTO.patch text/plain 11.5 KB
0002-doc-Add-stronger-deprecation-language-to-SELECT-INTO.patch text/plain 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-12-02 12:08:47 Re: SELECT INTO deprecation
Previous Message Peter Smith 2020-12-02 11:23:57 Re: [HACKERS] logical decoding of two-phase transactions