Thread

  1. Getting Started

    Fred Schroeder <fredws_snb@ionet.net> — 2001-02-08T20:19:16Z

    Hi all!
    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@localhost fred]$ psql
    psql: FATAL 1:  Database "fred" does not exist in the system catalog.    
    
    if I use the GUI program PostgreSQL Access, and try to create a new database, 
    I get the error message "Tcl error executing pg_exec create database first is 
    not valid postgresql connection"
    where I was trying to create a database named "first"
    What setting have I overlooked? 
    Sorry if this is a FAQ, but I have looked over the docs, but have not found 
    anything as of yet.
    TIA,
    Fred
    
    
  2. Re: Getting Started

    Anthony E . Greene <agreene@pobox.com> — 2001-02-09T04:50:17Z

    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@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@pobox.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/>