Search Postgresql Archives

Re: What Could Cause This Behavior?

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

 



On Thu, 26 Jan 2006, Rich Shepard wrote:

>    Now that I have postgres-8.1.2 properly configured and running I wanted to
> create a new database for an application. Postgres would not let me -- as a
> user -- create the database, so I su'd to 'postgres'.
>
>    As user 'postgres' I could invoke psql and tried to create the database
> with the command, 'create database contacts username=rshepard'. That failed
> with no error message. I exited from psql and user postgres and ran the

Did you put a semicolon at the end of the command?  I get a
ERROR:  syntax error at or near "username" at character 26
LINE 1: create database contacts username=sszabo
                                 ^
from 8.2 devel.  I would guess owner= is what you were looking for, but
I'm not sure.

>    Also, I (as a listed superuser of postgres) cannot run 'psql' and get a
> prompt. I'm told, 'psql: FATAL:  database "rshepard" does not exist'. But, as
> user postgres I can type 'psql' and get into the interactive mode.

psql defaults to connecting to a database of the same name as the user
when no database name is given.  Do you get the same if you explicitly try
to connect to a database?


[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