Re: Getting Started

From: "Anthony E (dot) Greene" <agreene(at)pobox(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Getting Started
Date: 2001-02-09 04:50:17
Message-ID: 20010208235017.E953@cp5340
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 08 Feb 2001 15:19:16 Fred Schroeder wrote:
>I am having troubles getting started with a database, I have pgsql
>installed,
>but can not seem to connect.
>I am running Linux Mandrake 7.2
>here is what I get from the command line:
>
>[fred(at)localhost fred]$ psql
>psql: FATAL 1: Database "fred" does not exist in the system catalog.

You can't create a database from within pgaccess. Create the database from
the command line:

bash$ su
bash# su postgres
bash$ createdb first
bash$ psql first
psql=> \i myscript.sql

Assumes "myscript.sql" contains DROP TABLE, CREATE TABLE, CREATE INDEX, and
GRANT/REVOKE commands. The SQL script can contain multiline comments in C++
fashion:

/* This is a multiline comment.
It ends with the closing asterisk
and slash.
*/

or single line comments in SQL fashion:

-- This is a single line comment.
-- You can use several in a row, but
-- each one must begin with two dashes.

Both styles are acceptable to postgresql, and both are displayed as a
comments in my favorite editor, vim.

Tony
--
Anthony E. Greene <agreene(at)pobox(dot)com> <http://www.pobox.com/~agreene/>
PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D
Chat: AOL/Yahoo: TonyG05 ICQ: 91183266
Linux. The choice of a GNU Generation. <http://www.linux.org/>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Geordie Hobart 2001-02-10 00:19:17 r-tree indexed searches
Previous Message Raymond Golish 2001-02-09 01:56:00 arrays of compound types