3 ms·
SQL is turing complete, at least on Postgres. Case statements provide control of flow and WITH Recursive CTEs provide looping/iteration/recursion. Pure SQL func
by garyclarke27 10y ago
SQL is turing complete, at least on Postgres.
Case statements provide control of flow and WITH Recursive CTEs provide looping/iteration/recursion.
Pure SQL functions can accomplish nearly anything (except dynamic execution, think macros) that procedural PL/pgSQL can, WITH statements provide variables and temp tables.
SQL is the most declarative language I'm aware of.