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 1pIRKB-0000vM-EM for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 09:35:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIRKA-0000I0-7v for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jan 2023 09:35:10 +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 1pIRK9-0000Hp-Ts for pgsql-hackers@lists.postgresql.org; Thu, 19 Jan 2023 09:35:09 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIRK7-0007T9-7N for pgsql-hackers@postgresql.org; Thu, 19 Jan 2023 09:35:09 +0000 Received: by mail-pj1-x102b.google.com with SMTP id m3-20020a17090a414300b00229ef93c5b0so581395pjg.2 for ; Thu, 19 Jan 2023 01:35:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=ayxlsb3cyaATYsVo4UkznHpdzKY1Kqsf12IVLtNfE4Q=; b=f4dnsHlM7nXF+mpa9QDLqkLK0jDpKyi1zPJOmbBAsQ2S6BHsBucOuP/3jWL+hwRSjR 0EeRa8/wXInbZHrqjZnhDTLmIPmSk4NIw6IICrqJFO/rro9cVijGC2rHfLFjBtolZfIy JeOxJ2p96jAbueYHHI0gDzp43AqKOX0/ZY+yAWhZCIo4CEAuf3PgnJTpP/23mH6x5cHb 3LSmt7tfj8Rl9gz3iKsxAZoiCNyDJl+XCV7E1YM+rT0a7J3Q6h6tAKDrQJ2sqyLswAZy /VIOMIF5LGMeXt4NIsALs2h4h3G/yoSGSuc543gkO0HbqDux6z1RfPQ67Vv2Ty0xPqBd pFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-language:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ayxlsb3cyaATYsVo4UkznHpdzKY1Kqsf12IVLtNfE4Q=; b=aPLIjK9aDRyWcDZ3j8a9iahGwIND1byTjLr9Wg6jIzrs65aaPpWSL4A813TOISxv09 yjpcr6aSjgyeGk3Xv/QOLjGP/XjoW8WDdFPiyyrPHwfrXJunej3jGQGkQ55Iq5yADYbS UOwWzEwygcxi6xE+wKGdS5OsTvbKhfy4Bz/w36gTD1n8y6nCkknuCc7Kei14KgwM+1IZ WNuXqfGnaEuFHBPHiSw2wR84nRxoxKNdnD6a6UNM1p51qZme8qs7ggMrl6Lo2klHj6sE iPpPMc2A0vtySNafSUjnyMW48IoXXHWmD32MIEHb7ObckNDAFRf++b3T6NQa+U5tzis5 L1EA== X-Gm-Message-State: AFqh2koeJQMFELY5ua4lP8XKDj3GYGiqsFkDwrpiQIEBY9fz6lEA9KR2 5LicTgOEzV8RQPNqGDXA6/X7DwUU3rCgqckcpzwEj+Va/BKLanmxbaMKWPQFRVvveEptekMS6GG jS+RUDTdt6gfWFY9gsfGPK2QDbwK6m3ci5mKm9QWb+Vul9ZkSylu/SgRVA6p8HFtW7znJhUF+2A KadrOYCnuxclrzHfhFGp3GaJyNXCmOPF0cTjyaLTv8b1gXMYf3qDoXVUSM26bnFB7QYtvLoLw/F 4XHgJHftK1QWoJcb97jOpPRRJ+nA9kT0U8UBKTP++mhKT3k7ts1QIVG/+eZEoL7GGbiQUFvtZqK a403m1Xgf2UIaXBpLIv5oqITmmc/WtAMqKqZ X-Google-Smtp-Source: AMrXdXv5WfDS2el+kKa5iQIzg3mKIREMzTl/uhtMCyyeYFxvnHQtQcCczmzCZfMcVXJCS5/e6XoOzQ== X-Received: by 2002:a17:902:8688:b0:193:19c3:4915 with SMTP id g8-20020a170902868800b0019319c34915mr9481392plo.67.1674120904513; Thu, 19 Jan 2023 01:35:04 -0800 (PST) Received: from localhost.localdomain ([114.143.109.178]) by smtp.gmail.com with ESMTPSA id a7-20020a1709027e4700b00192740bb02dsm23287392pln.45.2023.01.19.01.35.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 01:35:04 -0800 (PST) Subject: Re: CREATEROLE users vs. role properties To: Nathan Bossart , Robert Haas Cc: "pgsql-hackers@postgresql.org" References: <20230118231749.GA3790025@nathanxps13> From: tushar Message-ID: <482146ee-e73e-5378-6595-b06e044acc43@enterprisedb.com> Date: Thu, 19 Jan 2023 15:05:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20230118231749.GA3790025@nathanxps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/19/23 4:47 AM, Nathan Bossart wrote: > This seems like a clear improvement to me. However, as the attribute > system becomes more sophisticated, I think we ought to improve the error > messages in user.c. IMHO messages like "permission denied" could be > greatly improved with some added context. I observed this behavior where the role is having creatrole but still it's unable to pass it to another user. postgres=# create role abc1 login createrole; CREATE ROLE postgres=# create user test1; CREATE ROLE postgres=# \c - abc1 You are now connected to database "postgres" as user "abc1". postgres=> alter role test1 with createrole ; ERROR:  permission denied postgres=> which was working previously without patch. Is this an expected behavior? -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company