RE: Psql meta-command conninfo+

Поиск
Список
Период
Сортировка
От Maiquel Grassi
Тема RE: Psql meta-command conninfo+
Дата
Msg-id CP8P284MB249614E7926043EEF7F063EBEC442@CP8P284MB2496.BRAP284.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: Psql meta-command conninfo+  (Jim Jones <jim.jones@uni-muenster.de>)
Список pgsql-hackers
> 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.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: glibc qsort() vulnerability
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Where can I find the doxyfile?