Re: Strange User Problem

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: Strange User Problem
Дата
Msg-id 9A5CE3E8-6B00-11D9-9D53-000D933565E8@mail.nih.gov
обсуждение исходный текст
Ответ на Strange User Problem  (<operationsengineer1@yahoo.com>)
Ответы Re: Strange User Problem
Список pgsql-novice
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)


В списке pgsql-novice по дате отправления:

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: postgresql log file on fc2
Следующее
От:
Дата:
Сообщение: Re: Strange User Problem