Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0PA-0007T4-FP for pgsql-docs@arkaria.postgresql.org; Thu, 20 Dec 2018 15:38:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ga0P9-0005Ai-5v for pgsql-docs@arkaria.postgresql.org; Thu, 20 Dec 2018 15:38:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0P9-0005Ab-07 for pgsql-docs@lists.postgresql.org; Thu, 20 Dec 2018 15:38:31 +0000 Received: from stdpr.ru ([93.174.79.86] helo=mail.stdpr.ru) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ga0P6-0001Hl-4I for pgsql-docs@postgresql.org; Thu, 20 Dec 2018 15:38:30 +0000 Received: from mail.stdpr.ru (mail.elserv.msk.local [172.20.255.95]) by mail.stdpr.ru (Postfix) with ESMTP id 73E037FCCF for ; Thu, 20 Dec 2018 18:38:26 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 20 Dec 2018 18:38:26 +0300 From: antonov@stdpr.ru To: pgsql-docs@postgresql.org Subject: "$user" and SESSION_USER and CURRENT_USER Message-ID: <159151fb45d490c8d31ea9707e9ba99d@stdpr.ru> X-Sender: antonov@stdpr.ru User-Agent: Roundcube Webmail/1.3.3 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk hi, sorry for my message. I'm tiny confused about the next one. could you help me?: here -- https://www.postgresql.org/docs/11/runtime-config-client.html there is the text """If one of the list items is the special name $user, then the schema having the name returned by SESSION_USER is substituted, if there is such a schema and the user has USAGE permission for it. (If not, $user is ignored.)""". but actualy "$user" substitutes CURRENT_USER-value (not SESSION_USER-value). it's good because it would be a SECURITY VULNERABILITY if "$user" substituted SESSION_USER-value (in conjunction with security definer functions). in case of CURRENT_USER-value we have no the vulnerable. which is good :-) but is there error in documentation text (runtime-config-client.html) , isn't? thank you in advance.