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 1joCdN-0001vM-6M for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2020 21:08:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joCdM-0000Ph-2o for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jun 2020 21:08:40 +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 1joCdL-0000OF-R8 for pgsql-hackers@lists.postgresql.org; Wed, 24 Jun 2020 21:08:39 +0000 Received: from mail-vs1-xe42.google.com ([2607:f8b0:4864:20::e42]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1joCdJ-0002Vy-3D for pgsql-hackers@postgresql.org; Wed, 24 Jun 2020 21:08:39 +0000 Received: by mail-vs1-xe42.google.com with SMTP id k7so887275vso.2 for ; Wed, 24 Jun 2020 14:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=MRcGODtVx2SQ1Kxug1EQM0X9fanhpdF/iiuLrs9hesk=; b=Y5iEMhlZzW9/kU+yVmO28BGP+eUfNhpWgg7LNl5JQWEl9uvcsc3wPP6ELggDL+KT3a QAlzROE1gVWcDdYyeSDIr36jfJM82ZpOiUh8Pp22H+BVRiLJSY28G07uc0eFRMmy0r5n 7VU8K3GtsHCL8Fgh/6PC/SYkAi2AK2n6DmkF5o5W0vvhXgkD90icM9WdFnT9v8pjksjI FMNoQL6hX4Tx60fmw909g1it3swURvCPZd/MOiBDBvtpcXT78u/BPf5Db6gsZQaQGXKz +dR9YGedXSY6uKZi16hgd1zLlSzmJGdwFo5sCzkc3WcQ5ZsgtlOSF9mzjnbgLQcz8QJx tFwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=MRcGODtVx2SQ1Kxug1EQM0X9fanhpdF/iiuLrs9hesk=; b=nwRzmvx2HjPFCrXcWvl4XkQxe2Zj/8S8sRr+xHafaAgSHNDnOHr7NtVtu9pd+Cvp53 7ppaM914yPEhcP/ZeXDwGrYsGNT4WmDfbInrgz94GsTruf+nyJfro4BcBICBi6tKbhw8 QunWS7UZYPm5GaT5vo4So9bLaxF/+ZWI0o3VjmTbSy16RIvSpcPH0bvLZXLAKf5OwGLX np19ebSSlZom1hUITadQcz3hbzyetIozhfTvdMHhZGT0z633jF7w+r2yVNqYeD3/GcDO eVL4cfjSQ+61NK42lb4hymHXiMbRHq5PZYfAzHKZ/GSfvtsC4c/AicKROKHb6Q+yBLKL PbMg== X-Gm-Message-State: AOAM530Sr8illNn29cTObZa+qxeG+zdfwSoUkBBezrMccA5FU6uSiHnV IZYExcDurfcT/kbESOsqTa3wOQ== X-Google-Smtp-Source: ABdhPJznO3YY+z6qNqc+G9Zc01gc2fOIX3Q9ohaEs4yv9bE0ci0eCPoXlbH66PyfOhFmr08SmFyK8g== X-Received: by 2002:a67:8dc8:: with SMTP id p191mr10366060vsd.68.1593032915245; Wed, 24 Jun 2020 14:08:35 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id q5sm432914vsr.0.2020.06.24.14.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 14:08:34 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5B7572A3A97; Wed, 24 Jun 2020 17:08:31 -0400 (-04) Date: Wed, 24 Jun 2020 17:08:31 -0400 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: Allow CURRENT_ROLE in GRANTED BY Message-ID: <20200624210831.GA7173@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jun-24, Peter Eisentraut wrote: > I was checking some loose ends in SQL conformance, when I noticed: We > support GRANT role ... GRANTED BY CURRENT_USER, but we don't support > CURRENT_ROLE in that place, even though in PostgreSQL they are equivalent. > Here is a trivial patch to add that. Hmm, since this adds to RoleSpec, this change makes every place that uses that production also take CURRENT_ROLE, so we'd need to document in all those places. For example, alter_role.sgml, create_schema.sgml, etc. This also affects role_list (but maybe the docs for those are already vague enough -- eg. ALTER INDEX .. OWNED BY only says "role_name" with no further explanation, even though it does take "current_user".) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services