insert into foo(a) with recursive t(n) AS (SELECT 10 AS n UNION ALL SELECT n-1 FROM t WHERE n > 0) select n from t; works on 8.5 -- GJ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general