If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > Database Server Software > PostgreSQL > User vs roles.......

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Dec 2012
Posts: 3
User vs roles.......


I know this may sound a dumb question. But I am very new to PostgreSQL and very confused with the concepts of USER and ROLES.

Please help me to clarify this concept. What is basic difference of USER and ROLES. and also Difference between createuser wrapper, Create user (SQL) and Create ROLE Login( SQL).

Thanks in advance .
Reply With Quote
  #2 (permalink)  
Registered User
Join Date: Dec 2012
Posts: 32
I think "CREATE USER ..." is for hostorical reasons and was used in PostgreSQL pre version 8.

The documentation of PostgreSQL 9.2 describes it:
CREATE USER is now an alias for CREATE ROLE. The only difference is that when the command is spelled CREATE USER, LOGIN is assumed by default, whereas NOLOGIN is assumed when the command is spelled CREATE ROLE.
On both commands SQL "CREATE USER ..." and the external program "createuser" the new user is allowed to login.
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On