[1]: https://wiki.postgresql.org/wiki/Cyclic_Tag_System
More usefully, most databases allow you to write user-defined functions in other languages, including imperative SQL dialects.