Re: n00b question: createdb seeming to fail quietly on new ubuntu 9.1 installation

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Wells Oliver <wells(at)submute(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: n00b question: createdb seeming to fail quietly on new ubuntu 9.1 installation
Date: 2010-04-19 23:51:27
Message-ID: p2idcc563d11004191651m5f099fd3p54fb9557593eede7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 19, 2010 at 5:14 PM, Wells Oliver <wells(at)submute(dot)net> wrote:
> Just did an install via apt-get of 8.4 and ... well ... I was able to set
> the password for the postgres user, then I log in and type:
>
> createdb test

Is that from a command line that looks like this:

smarlowe(at)steamboat:/$

or this:

Welcome to psql 8.3.9, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

smarlowe=#

from the first one, createdb will work. From the second it's:

create database test;

(notice the ; which terminates the line and executes the SQL) ?

> It goes quietly, which according to the documentation is a success, but...
>
> \l doesn't show the database. Nor does
> /var/log/postgresql/postgresql-8.4-main.log indicate any issue.

Yeah, I'm betting you're in the psql monitor. createdb is a command
line command and it won't work from there. The psql monitor is silent
until it gets a command, which is terminated with ;.

> Secondly, adding a user seems to work, but I can't create the DB for the
> user (same issue as above). Any tips? Anything I can look at? This is a
> brand spanking new fresh 8.4 installation using the packages included in the
> 9.1 ubuntu packages.

Got an error message? Also, it's 9.10, not 9.1. The numbers
represent the year / month of the release, hence 9.10, not 9.1.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message George Woodring 2010-04-20 00:02:28 Re: Database corruption with duplicate tables.
Previous Message Greg Smith 2010-04-19 23:42:37 Re: performance problems inserting random vals in index