Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvJ4y-0005SM-7D for pgsql-general@arkaria.postgresql.org; Mon, 21 Jun 2021 12:31:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvJ4x-0002wZ-6h for pgsql-general@arkaria.postgresql.org; Mon, 21 Jun 2021 12:31:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvJ4w-0002rP-UQ for pgsql-general@lists.postgresql.org; Mon, 21 Jun 2021 12:31:02 +0000 Received: from gandalf.net-wizard.org ([138.201.143.9]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvJ4t-0001Zb-VH for pgsql-general@lists.postgresql.org; Mon, 21 Jun 2021 12:31:02 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.net-wizard.org (Postfix) with ESMTP id 2788F82F1D; Mon, 21 Jun 2021 14:30:56 +0200 (CEST) X-Virus-Scanned: Gentoo amavisd-new at aragorn Received: from aragorn.net-wizard.org ([127.0.0.1]) by localhost (aragorn.net-wizard.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T1nfjl3y1jGI; Mon, 21 Jun 2021 14:30:55 +0200 (CEST) Received: from webmail.net-wizard.org (localhost [IPv6:::1]) by gandalf.net-wizard.org (Postfix) with ESMTP id 8A44A82E67; Mon, 21 Jun 2021 14:30:55 +0200 (CEST) MIME-Version: 1.0 Date: Mon, 21 Jun 2021 14:30:55 +0200 From: Charles Clavadetscher To: Atul Kumar Cc: pgsql-general Subject: Re: user privileges In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: clavadetscher@swisspug.org Organization: Swiss PostgreSQL Users Group Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello On 2021-06-21 12:40, Atul Kumar wrote: > Hi, > > My question can be silly but I need to ask that if a user is created > without login privilege then what is the use of below command why > don't postgres prompt error on it > > CREATE ROLE nolog_user WITH PASSWORD 'pass1'; A user without login privilege is usally called a group and is used for bundling privileges that you can grant granting the role to individual users. This helps you to keep more order and structure in your DB privileges. You may also have a user that can login and for whatever reason must be restricted access for a certain time. > as the user is created with login privileges then what is the use such > user ? See above. > Where such users having no login privileges can be used ? Yes, you use it as a group. -- Charles Clavadetscher Spitzackerstrasse 9 CH - 8057 Zürich https://www.swisspug.org +------------------------+ | ____ ______ ___ | | / )/ \/ \ | | ( / __ _\ ) | | \ (/ o) ( o) ) | | \_ (_ ) \ ) _/ | | \ /\_/ \)/ | | \/ | | _| | | | \|_/ | | | | Swiss PostgreSQL | | Users Group | +------------------------+