Difference between set, \set and \pset in psql
Basically correct. The important difference is that SET is an SQL command while the other two are psql meta-commands – indicated by the leading \. SET is an SQL command to change run-time parameters. It is executed on the server and has nothing to do with psql per se. \set is a psql meta-command: Sets … Read more