[postgis-users] which db I am on?

Changqing Zhou czhou at cs.umn.edu
Wed Apr 14 10:00:14 PDT 2004


Hi Perry,

Thanks for the response. I had everything working on my xp laptop. The
question was regarding an UNIX instance which was installed by admin.

I did notice that the database is named after my user id: czhou.

********************
czhou at caesar (/home/grad05/czhou) % psql -h db
Password:
Welcome to psql 7.3.3, the PostgreSQL interactive terminal.

czhou=> select current_database();
 current_database
------------------
 czhou
(1 row)
********************

Changqing


On Tue, 13 Apr 2004, Pericles S. Nacionales wrote:

> 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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list