[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postgresql doubt ..



p wrote:
  >> here's all i did:
  >> 
  >> 1.  # su postgres
  >> 
  >> 2.  createuser <foo>
  >> 
  >> 3.  createdb <foo>
  >> 
  >> 4.  $ psql <data-base foo:  the "foo" for #3 above>
  >> 
  >> 
  >> 
  >> synopsis:
  >> 
  >> 1:  to change to postres "administrator"; 
  >> 
  >> 2:  to create "user"/non-root access (to the postgres
  >>     "server");
  >> 
  >> 3:  to create a database; 
  >> 
  >> 4:  to start a "console" session of postgresql.  (or,
  >>     if you want a gui "frontend," try (apt-get install)
  >>     pgaccess or gtksql.) 
  >> 
  >> 
  >> hth.
  >> 
  >> bentley taylor.
  >> 
  >> //
  >
  >...sorry, upon re-reading your email, i should have just
  >said that "$ su postgres" should be "# su postgres" (or
  >in other words, it should be setup as "root.")

No, that's not necessary and makes no difference, except that in the
latter case, it would be root's environment rather than the logged-in
user's that would be used.  The only real difference from doing
'su postgres' as root is that you would not be asked for a password.

What you should do, however, is 'su - postgres' which will read the 
login environment for the postgres user.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "If my people, which are called by my name, shall 
      humble themselves, and pray, and seek my face, and 
      turn from their wicked ways; then will I hear from 
      heaven, and will forgive their sin, and will heal 
      their land."               II Chronicles 7:14 




Reply to: