Who am I? Where am I connected?

Поиск
Список
Период
Сортировка
От Dominique Devienne
Тема Who am I? Where am I connected?
Дата
Msg-id CAFCRh-_BSW8VRPPQU6OrKmLZmk1+-0GvbBObgkMmqWf2_YqMkQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Who am I? Where am I connected?  (Ganesh Korde <ganeshakorde@gmail.com>)
Re: Who am I? Where am I connected?  (Christoph Moench-Tegeder <cmt@burggraben.net>)
Re: Who am I? Where am I connected?  (Dominique Devienne <ddevienne@gmail.com>)
Re: Who am I? Where am I connected?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Who am I? Where am I connected?  (Erik Wienhold <ewie@mailbox.org>)
Список pgsql-general
LibPQ has various defaults for the host, user, and DB name.
There's also the password file, the service file and service name.
In the example below, I can connect with a "naked" psql invocation.

Once connected, can I find out all aspects of the connection string?
Or where they came from, like a pgpass.conf or service file?

How to get the host, port, db name once connected?
SHOW and pg_settings does not appear to be it, at first glance.

Thanks, --DD

c:\Users\ddevienne>psql
psql (12.1, server 14.2)
WARNING: psql major version 12, server major version 14.
         Some psql features might not work.
WARNING: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

ddevienne=>



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Restricting user to see schema structure
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: Who am I? Where am I connected?