Re: Syntax Help Requested

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Syntax Help Requested
Date: 2006-04-17 16:58:10
Message-ID: 2113.1145293090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rich Shepard <rshepard(at)appl-ecosys(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2006-04-17 17:11:46 Re: Syntax Help Requested
Previous Message Kaloyan Iliev 2006-04-17 16:44:04 COMMENT and inheritance