Several times I am a little embarrassed when working with psql meanwhile, when to use set vs. \set vs. \pset . I think that:
set - for session variables when I connect to db. For example SET ROLE dba ;\set for local variables for this psql session. For example \set time 'select current_timestamp'\pset is for psql settings for this psql session. For example, '\pset border 2'
But I never found what, in my opinion, was a good explanation for everyone. Are my assumptions correct?
I am using PostgreSQL 9.4
source share