(I suspect the answer is yes, but I don't see it confirmed anywhere.)
In psql we can set environment variables using the \setenv {name} {value}
command.
Are these the same environment variables as the ones in the shell?
For reference the relevant page in the documentation.