Search Postgresql Archives

Re: Post Install / Secure PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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."?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux