Re: Strange User Problem - Mailing list pgsql-novice

From
Subject Re: Strange User Problem
Date
Msg-id 20050120163716.59604.qmail@web52410.mail.yahoo.com
Whole thread Raw
In response to Re: Strange User Problem  (Sean Davis <sdavis2@mail.nih.gov>)
List pgsql-novice
sean,

perfect.

thank you.

my world makes sense once again!

--- Sean Davis <sdavis2@mail.nih.gov> wrote:

> I think I understand your problem.
>
> In the shell, if you do:
>
> psql
>
> psql will try to connect to a database with the same
> name as the user
> starting psql.  If you are user Owner, the psql
> without options is
> interpretted as:
>
> psql Owner
>
> If the database Owner doesn't exist, you will get
> the error below.
> Note that the user Owner exists, just not the
> database Owner.  If
> instead you do something like:
>
> psql template1
>
> and user Owner has access to template1 and template1
> exists, the
> command will succeed.  In other words, if no
> database called Owner
> exists, you have to specify one that does and that
> Owner has access to.
>
> Sean
>
> On Jan 20, 2005, at 11:10 AM,
> <operationsengineer1@yahoo.com> wrote:
>
> > i started up pgsql as i usually do...  this time,
> > though, when i tried to start psql, i got the
> > following error:
> >
> > FATAL: database "Owner" does not exist
> > psql: FATAL: database "Owner" does not exist
> >
> > i used "Owner" to create my database.
> >
> > to make matters more interesting...
> >
> > i was able to connect to pgAdminIII using user
> > "Owner".  when i tried to create another user
> "Owner",
> > i received the following error:
> >
> > ERROR: user "Owner" already exists.
> >
> > it is pretty interesting to see both these errors,
> one
> > after the other, in my cygwin bash shell.  ;-)
> >
> > when i go to "Users(1)" in pgAdminIII and click on
> > Owner, i see the following sql...
> >
> > -- User: "Owner"
> >
> > -- DROP USER "Owner";
> >
> > CREATE USER "Owner"
> >   WITH SYSID 1
> >   ENCRYPTED PASSWORD ''
> >   CREATEDB CREATEUSER;
> >
> > is the -- DROP USER "Owner"; normal?  i never
> typed in
> > that sql at ny time.
> >
> > any ideas how to get psql to recognize "Owner"
> exists
> > would be appreciated.
> >
> > i'm running the latest cygwin (pgsql 7.4.5) on
> winxp.
> > this is the 2nd time i've logged into the pgsql
> since
> > installing cygwin.  there were no problems the
> first
> > time.
> >
> > tia...
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - 250MB free storage. Do more. Manage
> less.
> > http://info.mail.yahoo.com/mail_250
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the
> unregister command
> >     (send "unregister YourEmailAddressHere" to
> > majordomo@postgresql.org)
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Re: Strange User Problem
Next
From: sarlav kumar
Date:
Subject: Re: generating dynamic queries using pl/pgsql