Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Mon, 17 Apr 2006 12:58:10 -0400
  • Message-id: <2113(dot)1145293090(at)sss(dot)pgh(dot)pa(dot)us>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group