Re: Syntax Help Requested

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Syntax Help Requested
Дата
Msg-id 2113.1145293090@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Syntax Help Requested  (Rich Shepard <rshepard@appl-ecosys.com>)
Ответы Re: Syntax Help Requested  (Rich Shepard <rshepard@appl-ecosys.com>)
Re: Syntax Help Requested -- RESOLVED  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
Rich Shepard <rshepard@appl-ecosys.com> writes:
> postgres (from my user account):

> createdb contacts
> createuser xrms     # This creates the ROLE xrms
> grant all on contacts to xrms; # This generates an error at 'to'.

That last is a SQL command, not a shell command, and anyway it would
default to assuming you were trying to grant privileges on a table
named "contacts" not a database named contacts.

What you probably really should do is

    createuser xrms
    createdb --owner=xrms contacts

and go from there.

>    When I request a list of databases (psql -l), the one named contacts is
> there. However, when I open the database (psql contacts), there's no one
> home; that is, 'psql -d' returns 'no relations found.'

You didn't show us any attempt to create anything in contacts ...

>    I need a clue on how to let user 'xrms' access the database 'contacts' so
> the install script runs correctly.

What exactly happens when you try to run the script?  With the default
setup it shouldn't really matter whether xrms is the owner of the
contacts database or not.

            regards, tom lane

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

Предыдущее
От: Justin Pasher
Дата:
Сообщение: Will changing the server date/time cause problems?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Syntax Help Requested