Temporary constant table.
--- a/postgres.rst Tue May 12 15:38:18 2020 +0300
+++ b/postgres.rst Tue Jun 16 14:37:50 2020 +0300
@@ -625,4 +625,21 @@
perform 1 union all select 2;
end$$;
+Temporary constant table
+========================
+Standard SQL syntax::
+
+ SELECT 1 AS num, 'a' AS str
+ UNION ALL SELECT 2, 'b'
+ UNION ALL SELECT 3, 'c';
+
+Postgre extension::
+
+ SELECT num, str FROM (
+ VALUES (1, 'a'), (2, 'b'), (3, 'c')) AS tbl(num, str);
+
+To generate table::
+
+ SELECT val FROM generate_series(1, 10) val;
+