Thread: access to psql variables from server again

access to psql variables from server again

From
Pavel Stehule
Date:
Hello

I am returning to topic, that I opened with discussion about enhancing
protocol to support access to host variables.

There was a second idea about joining host variables and session
variables. This can be implemented without protocol enhancing, but it
is only one way tool - we are able read host parameters only on start
- but we can simply forward changes of session variables to host. I
have another idea - just for psql. We can define two commands to copy
psql variable to server and from server to psql. This mechanism is
very simple and robust. There is not problem with security or some
unwanted overhead.

\vf hostvar  [ sessionvar ] -- variable forward
\vl hostvar  [ sessionvar ] -- variable load

Name of session variable is optional, when is not specified, then
"host"."hostvar" is used.

Ideas, comments?

Regards

Pavel