Search Postgresql Archives

Re: running postgres

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

 



On Thu, Feb 5, 2009 at 15:35, Kusuma Pabba <kusumap@xxxxxxxxxxxxx> wrote:
>
> may this be a silly doubts but , i am new to postgres, please answer to
> these::
>
> /usr/local/pgsql/bin/psql test
> test=#
>
>
> sudo su postgres -c psql template1
> template=#
>
>
> what is the difference between the above two and,
> why is the path different in both cases
> which should i use now

first you connect to the database test

in the second one you run the command "psql" on the database template1

  -c COMMAND      run only single command (SQL or internal) and exit

>
> how can i create a user  in test or template
> when i give create user
> it is asking for create role , how should i create role?

you can create a user with "createuser" commandline tool or use the
CREATE ROLE sql command
(http://www.postgresql.org/docs/8.3/static/sql-createrole.html) and
then use the GRANT command
(http://www.postgresql.org/docs/8.3/static/sql-grant.html) to give the
user rights to the database you want. See the GRANT ... ON DATABASE
part for this.

-- 
[ Clemens Schwaighofer                      -----=====:::::~ ]
[ IT Engineer/Manager                                        ]
[ E-Graphics Communications, TEQUILA\ Japan IT Group         ]
[                6-17-2 Ginza Chuo-ku, Tokyo 104-8167, JAPAN ]
[ Tel: +81-(0)3-3545-7703            Fax: +81-(0)3-3545-7343 ]
[ http://www.tequila.jp                                      ]

Advertising Age Global Agency of the Year 2008
Adweek Global Agency of the Year 2008

This e-mail is intended only for the named person or entity to which 
it is addressed and contains valuable business information that is 
privileged, confidential and/or otherwise protected from disclosure.  
Dissemination, distribution or copying of this e-mail or the 
information herein by anyone other than the intended recipient, or 
an employee or agent responsible for delivering the message to the 
intended recipient, is strictly prohibited.  All contents are the 
copyright property of TBWA Worldwide, its agencies or a client of 
such agencies. If you are not the intended recipient, you are 
nevertheless bound to respect the worldwide legal rights of TBWA 
Worldwide, its agencies and its clients. We require that unintended 
recipients delete the e-mail and destroy all electronic copies in 
their system, retaining no copies in any media.If you have received 
this e-mail in error, please immediately notify us via e-mail to 
disclaimer@xxxxxxxxxxxxxx  We appreciate your cooperation.

We make no warranties as to the accuracy or completeness of this 
e-mail and accept no liability for its content or use.  Any opinions
expressed in this e-mail are those of the author and do not 
necessarily reflect the opinions of TBWA Worldwide or any of its 
agencies or affiliates. 


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux