inheritance of connection paramters when using \c
Hello!
\c is followed by [-reuse-previous=on/off] positional syntax | conninfo
Using \c -reuse-previous=on positional syntax or \c positional syntax without -reuse-previous option, some parameters which were omitted or notated as "-" will be reused in the new connection.
The target is only "dbname", "user", "host", "port" in the current implementation.
# details in [1]https://www.postgresql.org/docs/12/app-psql.html
When we discussed in [2]/messages/by-id/EDA4195584F5064680D8130B1CA91C45367328@G01JPEXMBYT04 Best regards, --------------------- Ryohei Nagaura, this topic came out.
Although I'm not heavy psql user, I want it to inherit connection parameters and Fabien-san does too.
My new specification:
\c inherits all the unspecified connection parameters in PQconninfoOptions in cases below.
a) \c -reuse-previous=on positional syntax
b) \c positional syntax
This is just an expansion of the target of inheritance of parameters from the current specification.
I have an item to talk about.
It is whether the message which indicates connection information to users has to have more information such as
You are now connected to database "TomANDJelly" as user "nyannyan" with some parameters [reused | defaults].
# after "nyannyan"
Do you have any thoughts?
[1]: https://www.postgresql.org/docs/12/app-psql.html
[2]: /messages/by-id/EDA4195584F5064680D8130B1CA91C45367328@G01JPEXMBYT04 Best regards, --------------------- Ryohei Nagaura
Best regards,
---------------------
Ryohei Nagaura