Re: Syntax Help Requested - Mailing list pgsql-general

From Tom Lane
Subject Re: Syntax Help Requested
Date
Msg-id 2113.1145293090@sss.pgh.pa.us
Whole thread Raw
In response to Syntax Help Requested  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Syntax Help Requested  (Rich Shepard <rshepard@appl-ecosys.com>)
Re: Syntax Help Requested -- RESOLVED  (Rich Shepard <rshepard@appl-ecosys.com>)
List 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 by date:

Previous
From: Justin Pasher
Date:
Subject: Will changing the server date/time cause problems?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Syntax Help Requested