| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | John R Pierce <pierce(at)hogranch(dot)com> | 
| Cc: | Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Post Install / Secure PostgreSQL | 
| Date: | 2010-09-15 17:55:03 | 
| Message-ID: | 21605.1284573303@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
John R Pierce <pierce(at)hogranch(dot)com> writes:
>   On 09/15/10 10:00 AM, Carlos Mennens wrote:
>> 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?
> no, there is no such state in postgres.  you connect and log into a 
> database.  connecting to a different database requires closing that 
> connection and opening a new one (which is what the \c command does in 
> psql).
It might be worth pointing out that what mysql calls a database is more
or less what we call a schema; there isn't any close equivalent in mysql
to a Postgres installation with multiple databases.  The initial state
in mysql is about like having an empty search_path in PG: you can get at
all tables in the database, you just have to qualify their names
explicitly.  And "USE database" corresponds to a "SET search_path"
operation.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Carlos Mennens | 2010-09-15 18:10:45 | Re: Post Install / Secure PostgreSQL | 
| Previous Message | Richard Broersma | 2010-09-15 17:45:25 | Re: Post Install / Secure PostgreSQL |