Re: Post Install / Secure PostgreSQL

Поиск
Список
Период
Сортировка
От Carlos Mennens
Тема Re: Post Install / Secure PostgreSQL
Дата
Msg-id AANLkTikgb8VJ3d5r7P6gsGNHYmH=1z4e_N_N5HF=wqv8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Post Install / Secure PostgreSQL  (Craig Ringer <craig@postnewspapers.com.au>)
Ответы Re: Post Install / Secure PostgreSQL  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
Thanks all for the help! I have a much better understanding now of how
user accounts are managed via ident authentication.

The only thing I have yet to figure out or understand is how to login
to PostgreSQL as my user account but not to any specific database. I
understand that when I am logged in as my user account, I can simply
login using:

psql -U cmennens <database_name> (I know I can omit the '-U cmennens'
if I am 'cmennens' via Linux shell)

But when if 'cmennens' wants to login to PostgreSQL but not connect to
any specific database? I know in MySQL you can login to the MySQL
server CLI but not be attached to any specific database if you want to
just peek around and do basic administrative tasks. Is this possible
in PostgreSQL?

When I do the following, it works but I think only because it's using
ident credentials and then connects automatically to the 'postgres'
database. I could be wrong however...

[postgres@db1 ~]$ psql
psql (8.4.4)
Type "help" for help.

postgres=# \d
No relations found.
postgres=# \dt
No relations found.
postgres=# \c postgres
psql (8.4.4)
You are now connected to database "postgres".
postgres=# \dt
No relations found.
postgres=# \d

From the above I login as 'postgres' but don't specify a specific
database to connect to. Is this possible to do as my user 'cmennens'
who is listed as a super user?

Also from above, if I connect to the 'postgres' database as 'postgres'
user, why can I not list any tables above? I keep getting "No
relations found."?

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

Предыдущее
От: Michael Hull
Дата:
Сообщение: Using libpq, floats and binary data
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Post Install / Secure PostgreSQL