> v8 no longer throws a permission denied error for non-superusers - it is > IMHO much nicer this way. > > $ /usr/local/postgres-dev/bin/psql postgres -p 5432 -h 127.0.0.1 -U jim > psql (17devel) > Type "help" for help. > > postgres=# \x > Expanded display is on. > postgres=# \conninfo+ > Current Connection Information > -[ RECORD 1 ]------+---------- > Database | postgres > Authenticated User | jim > System User | > Current User | jim > Session User | jim > Session PID | 1321493 > Server Version | 17devel > Server Address | 127.0.0.1 > Server Port | 5432 > Client Address | 127.0.0.1 > Client Port | 49366 > Socket Directory | > Host | 127.0.0.1 > > postgres=# SET ROLE foo; > SET > postgres=> \conninfo+ > Current Connection Information > -[ RECORD 1 ]------+---------- > Database | postgres > Authenticated User | jim > System User | > Current User | foo > Session User | jim > Session PID | 1321493 > Server Version | 17devel > Server Address | 127.0.0.1 > Server Port | 5432 > Client Address | 127.0.0.1 > Client Port | 49366 > Socket Directory | > Host | 127.0.0.1 > > The patch now applies cleanly. > > One thing I just noticed. The psql autocomplete feature does not suggest > the new + option of \conninfo. For instance, when typing "\connin[TAB]" > it automatically autocompletes to "\conninfo ". I guess it should also > be included in this patch. > > I can do a more thorough review of the code when you add the > documentation and tests to the patch. > > Thanks!
--//-- Hi Jim, It's not a psql standard to use tab-complete for commands ending with +. You can verify this in the /* psql's backslash commands. */ section of the file "/src/bin/psql/tab-complete.c". https://github.com/postgres/postgres/blob/fdfb92c0307c95eba10854196628d88e6708901e/src/bin/psql/tab-complete.c In v9, I started the documentation work and am open to suggestions. > "I can do a more thorough review of the code when you add the > documentation and tests to the patch." Soon I'll be developing the tests. And that will be welcome. Thanks a lot! Regards, Maiquel Grassi.
v9-0001-psql-meta-command-conninfo-plus.patch
Description: v9-0001-psql-meta-command-conninfo-plus.patch