mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-12 09:27:04 +08:00
Remove gratuitous uses of deprecated SELECT INTO
CREATE TABLE AS has been preferred over SELECT INTO (outside of ecpg and PL/pgSQL) for a long time. There were still a few uses of SELECT INTO in tests and documentation, some old, some more recent. This changes them to CREATE TABLE AS. Some occurrences in the tests remain where they are specifically testing SELECT INTO parsing or similar. Discussion: https://www.postgresql.org/message-id/flat/96dc0df3-e13a-a85d-d045-d6e2c85218da%40enterprisedb.com
This commit is contained in:
@ -86,7 +86,8 @@ SELECT count(*) FROM test_missing_target x, test_missing_target y
|
||||
|
||||
-- group w/o existing GROUP BY target under ambiguous condition
|
||||
-- into a table
|
||||
SELECT count(*) INTO TABLE test_missing_target2
|
||||
CREATE TABLE test_missing_target2 AS
|
||||
SELECT count(*)
|
||||
FROM test_missing_target x, test_missing_target y
|
||||
WHERE x.a = y.a
|
||||
GROUP BY x.b ORDER BY x.b;
|
||||
@ -142,7 +143,8 @@ SELECT count(b) FROM test_missing_target x, test_missing_target y
|
||||
|
||||
-- group w/o existing GROUP BY target under ambiguous condition
|
||||
-- into a table
|
||||
SELECT count(x.b) INTO TABLE test_missing_target3
|
||||
CREATE TABLE test_missing_target3 AS
|
||||
SELECT count(x.b)
|
||||
FROM test_missing_target x, test_missing_target y
|
||||
WHERE x.a = y.a
|
||||
GROUP BY x.b/2 ORDER BY x.b/2;
|
||||
|
||||
Reference in New Issue
Block a user