[postgis-users] which db I am on?

Pericles S. Nacionales nacional at cbs.umn.edu
Tue Apr 13 14:15:54 PDT 2004


Changqing,

Hello again.  How are your accessing the database?  psql? and what user
are you accessing it as?  postgres, or whatever new user you created? 
Chances are that if you just typed psql, postgresql will open (or maybe
even create) a database with the same name as the user who invoked the
program.

Anyway, to answer your question.  If you are running psql just type "\?"
at the prompt.  This will return something like:
***
General
  \c[onnect] [DBNAME|- [USER]]
                 connect to new database (currently "ugl")
...<snip>...
***
Here it's saying my current database is "ugl".

I hope that helps.

-Perry


On Tue, 2004-04-13 at 14:03, Changqing Zhou wrote:
> Hi,
> 
> This is a dumn questions and I realy spent almost an hour to search
> answer:
> 
> How do I know which database I am on? Is it a postgres sql I can do to
> figure that out? My admin must have specified some default one for me.
> 
> Thanks,
> 
> Changqing
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-- 
Pericles S. Nacionales <nacional at cbs.umn.edu>
University of Minnesota




More information about the postgis-users mailing list