The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

postgresql issue

Discussion in 'General Discussion' started by Zion Ahead, Apr 29, 2007.

  1. Zion Ahead

    Zion Ahead Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Can someone please tell me how to quickly create a new pg database in latin1 format?

    I already ran this successfully:

    createdb --encoding='LATIN1' sinalbahia

    But, I'm trying to apply it to a specific user name and cannot even list the postgresql databases

    bash-3.00$ su - psql
    bash: /bin/su: Permission denied
    bash-3.00$ ls
    ls: .: Permission denied
    bash-3.00$ l
    bash: l: command not found


    root@server [~]# rpm -q postgresql
    postgresql-8.2.1-1PGDG
     
  2. Zion Ahead

    Zion Ahead Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    can someone please help out here?
    Code:
    -bash-3.00$ psql -l
               List of databases
          Name       |  Owner   | Encoding 
    -----------------+----------+----------
     juancasi_prueba | juancasi | UTF8
     postgres        | postgres | UTF8
     sinalbahia      | postgres | LATIN1
     template0       | postgres | UTF8
     template1       | postgres | UTF8
    (5 rows)
    Code:
    -bash-3.00$ psql -U postgres
    Welcome to psql 8.2.1, 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
    
    postgres=# GRANT ALL PRIVILEGES ON sinalbahia TO nexen;
    ERROR:  relation "sinalbahia" does not exist
     
Loading...

Share This Page