Search Postgresql Archives

Re: Syntax Help Requested

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rich Shepard <rshepard@xxxxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux