May 2018
Intermediate to advanced
576 pages
30h 25m
English
Conditional statements are usually part of flow control statements, which include also iterations.
While iterating is not directly supported by psql, a similar effect can be achieved in other ways. For instance:
SELECT /* add a termination condition as appropriate */ AS do_loop\gset\if do_loop\ir file.sql\endif