#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    102
    Rep Power
    15

    redhat linux 7.3 problem


    I just installed redhat linux 7.3. During the initial installation, I had it install postgresql. After I su as postgres, I then run the command 'psql template1'. At the psql command prompt, I try to run various command, but none of them work. When I hit enter, the command line just opens up another line and my command is lost into infinity.

    Any ideas why this is happening?

    Nothing works. I cannot run select statements.... Nothing....

    Please help!

    Thanks in Advance....
    Edgar Castanedo
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    409
    Rep Power
    13
    Hi ecastanedo,

    The psql program can be difficult to deal with.

    Are you using the backslash character before issuing each command? (\)

    For example, \h will show a list of help commands.

    I recommend geting an admin tool to help you get started, so you don't have to use command line:

    Any good admin for pgsql beside phpPgAdmin?
  4. #3
  5. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    61
    Hey ecastanedo,

    Er... you are aware that an SQL command has to end with a semicolon in order to execute, right? In fact, you can enter several lines worth of statements, and then end them all with a ";" and only then will they execute. Very useful feature, because then you can do something nice and readable like
    Code:
    SELECT
       id,
       firstname,
       lastname
    
    FROM
       myusers
    
    WHERE
       lastname = 'Striker'
    AND
       firstname = 'Ted'
    
    ;
    The semicolon basically means "Got it? Go!".
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com

IMN logo majestic logo threadwatch logo seochat tools logo