Is there a concise way to select the nextval for a PostgreSQL sequence multiple times in 1 query? This would be the only value being returned.
For example, I would
My current best solution is:
SELECT NEXTVAL('mytable_seq') AS id UNION ALL SELECT NEXTVAL('mytable_seq') AS id UNION ALL SELECT NEXTVAL('mytable_seq') AS id;
Which will correctly return 3 rows... but I would like something that is minimal SQL for even as much as 100 or more NEXTVAL invocations.