Alias 'i' is never used in SELECT statement
14 a+(b*c), (a+b)*c -- ditto
15
16
17INSERT INTO mnop (m, n) SELECT i, (1e9 + i/2e4)::float FROM generate_series(1, 2e4) AS i(i) RETURNING NOTHING18
19CREATE TABLE midprimarykeyswapcleanup AS SELECT * FROM generate_series(1,3) AS a;
20-- This schema change is used to enable the primary key swap. The backup is not taken during this schema change.
Description
Tables should not be aliased if that alias is not used. An usused alias makes code harder to read without changing any functionality.
Bad practice
SELECT
a
FROM foo AS zoo
Recommended
Use the alias or remove it.
SELECT
zoo.a
FROM foo AS zoo
-- Alternatively...
SELECT
a
FROM foo