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 1paKXW-0003sF-22 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 17:58:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1paKXU-0004Lz-VJ for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Mar 2023 17:58:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1paKXU-0004Le-KC for pgsql-hackers@lists.postgresql.org; Thu, 09 Mar 2023 17:58:52 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1paKXS-0008Hv-7p for pgsql-hackers@postgresql.org; Thu, 09 Mar 2023 17:58:51 +0000 Received: by mail-pj1-x102f.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so2729323pjp.2 for ; Thu, 09 Mar 2023 09:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678384729; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8VlcVG7rcb1sA9K1MUg94gVpdxGwUA3WgiH/OGpexrI=; b=oVmLbWxEdcXvkep1IsRkHYp8RS6aMVx3sW1/UazY77bI/kkQhBgYjqqhNf+F1DIzpV cRceHYmxZ8O/7fgLgf9Hjg15bAvTI3s6cm/r10CBtuMZ5z0aQ6lBT/AdrCP7oZ5RXeI3 fgQ6yKRm0K9PLu43I4FEEEIYfntWKu/Ucrl64P5wgVNjMcmqQald6LX23cNqePJljSud 4sLT4r96uEDZrzKNH43t+MO1heCBNi3OQIZCII9Be1JBPGzy5Mn2auLh15JePne/hqqs IqZU4azjebrfc4LLb6a+z2fxwh6y/UBGadQfhUlDwGGsQR9Q9jKdqEZMq4yM7MHdbkd4 QmyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678384729; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8VlcVG7rcb1sA9K1MUg94gVpdxGwUA3WgiH/OGpexrI=; b=nGa0M/OvJz/ivqMtQQrRvWEttYVT8+cWUVQlQx5VT8vN1Z7hXmMsV/HI0OWbbbl0TV Eh45LLV9BGAJ6Po2Ms/m26kCj8e5RpO+JcpNgYOsdJ671Jpu0c+xkBMtzc61/52umiXB xTLg2Xee+aS8eyk0cMOP44RweUWWLFA2hmUag4tUP5lrficrVHEAqhSdKijTUHssqZi/ uL1TPKFMGmmN2DCmYR5zqDFNbbrubrBRjNWNRHB3MV7NqiCwVHbRKzoCsAvcvy8uBak7 UmXxd50vbgDbKANWCp12tDx9dUav3sa6oC8vOenqEIVM6pxGPkpVhKmflBn9JCE41y/G hZEg== X-Gm-Message-State: AO0yUKXckflPhB2zDGvHfphBFK1CHgrSGaTcmhgRDMPD4Stf+I1aNocl x/57K5wuw/HpP4XpkGnsBbFm58B6Z+M= X-Google-Smtp-Source: AK7set+WExFyqyWNLYVJMkPjfRx/ajJL3CQYDTHFxK5r0e3qW5B0yW5sM25zIa7517M9Ipgwt5EOnw== X-Received: by 2002:a17:903:2441:b0:196:5bac:e319 with SMTP id l1-20020a170903244100b001965bace319mr28033786pls.35.1678384728768; Thu, 09 Mar 2023 09:58:48 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id b5-20020a170902b60500b0019a87ede846sm11752795pls.285.2023.03.09.09.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 09:58:48 -0800 (PST) Date: Thu, 9 Mar 2023 09:58:46 -0800 From: Nathan Bossart To: Peter Eisentraut Cc: Alvaro Herrera , Tom Lane , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: improving user.c error messages Message-ID: <20230309175846.GA3626988@nathanxps13> References: <20230127000936.GA1998073@nathanxps13> <20230127183119.e5jtyh4g2md57ctb@alvherre.pgsql> <20230127231507.GA2221340@nathanxps13> <20230207201009.GA450353@nathanxps13> <20230220190210.GA3481922@nathanxps13> <20230220225852.GA3940888@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 09, 2023 at 10:55:54AM +0100, Peter Eisentraut wrote: > On 20.02.23 23:58, Nathan Bossart wrote: >> For now, I've reworded these as "must inherit privileges of". > > I don't have a good mental model of all this role inheritance, personally, > but I fear that this change makes the messages more jargony and less clear. > Maybe the original wording was good enough. I'm fine with that. > "admin option" is sort of a natural language term, I think, so we don't need > to parametrize it as "%s option". Also, there are no other "options" in > this context, I think. v16 introduces the INHERIT and SET options. I don't have a strong opinion about parameterizing it, though. My intent was to consistently capitalize all the attributes and options. > A general thought: It seems we currently don't have any error messages that > address the user like "You must do this". Do we want to go there? Should we > try for a more impersonal wording like > > "You must have the %s attribute to create roles." > > "Current user must have the %s attribute to create roles." > > "%s attribute is required to create roles." I think I like the last option the most. In general, I agree with trying to avoid the second-person phrasing. > By the way, I'm not sure what the separation between 0001 and 0002 is > supposed to be. I'll combine them. I first started with user.c only, but we kept finding new messages to improve. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com