Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjSSb-0001v6-PO for pgsql-docs@arkaria.postgresql.org; Mon, 12 Sep 2016 14:43:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bjSSb-0006T9-Bk for pgsql-docs@arkaria.postgresql.org; Mon, 12 Sep 2016 14:43:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjSSa-0006T1-QO for pgsql-docs@postgresql.org; Mon, 12 Sep 2016 14:43:49 +0000 Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bjSST-0002LY-Nz for pgsql-docs@postgresql.org; Mon, 12 Sep 2016 14:43:47 +0000 Received: by mail-lf0-x22b.google.com with SMTP id l131so88872135lfl.2 for ; Mon, 12 Sep 2016 07:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version; bh=CDzStm1Jbo1fFtsk9Sdx9RAkgxmVcupGFeVm9oXM8io=; b=flb4X0dkh3+agTs7k7YrGPxCYwtznO4LInNDgPmzN3E2D8UVdyrJf3JG2epuBpZtQw xiAUWvo7QWc8Koxm+QticLOZlCNrpoXS2oXJu3E+e3YOMQRyXwCbVRWl4fUX1+0jr8nB /G3X3muSZvn6EIJfNqhIQPrDKEQpsQF+Pb3bQQ7yRBZdUM8FKtKgTq3dJmHRTdFg2iRh zy0MIvnndHzHaIhoz/vTk3jIHBWh5+tOT8nG51EFlEfi51X5AzZGK5w0weqF1s5q7Yrd QJxmZjB5Jvdb0YfhhcLhFU6vwpsvSxO8lhotooT+CxyW4kUgKEY3La9Mr4oHtl2LeWMG +TzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=CDzStm1Jbo1fFtsk9Sdx9RAkgxmVcupGFeVm9oXM8io=; b=U8ZPGtWgwkWVlujfCcyiItLUlsF+QS4G1ec2fIum9kBt1iqVafQMqID68T5JXis2Jy Lxs0LaMZZ3gsu7wMdnTpwPG416C6DwnWISUWGbQ2LMbFXocO9WIx82CfWq5JWflusmXh MELuliKfHYkCE3qeDAdEA7K5ugfXvN4KoxeDRX8nDjyFr/dgDRCnNu893ncKWlfr60oV XUYwqxmx6wRKsGZvcBMS+dndWh5h+XKlWGIOP8lrvAOwCH5TO5oUsxoQtBrDDBnyviZ/ O9TNhUvfXtfZq7EfWldrf53mgu2bNiHR2jogWkEVFyul46yAy07lGcJvVKSZ0AwO7BCE 7Svw== X-Gm-Message-State: AE9vXwN19GERhUB5MO1dHkBkW7s1eHsKo+GYmNQ+n1GdECivj8f/ooS/vdknnoKLWzU4lQ== X-Received: by 10.46.69.11 with SMTP id s11mr706198lja.7.1473691419351; Mon, 12 Sep 2016 07:43:39 -0700 (PDT) Received: from [1.0.0.7] ([109.196.196.47]) by smtp.gmail.com with ESMTPSA id f3sm3222104lff.21.2016.09.12.07.43.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 07:43:38 -0700 (PDT) To: "pgsql-docs@postgresql.org" From: Alexander Law Subject: Invalid field name in RLS description Message-ID: <905bf384-92a8-20aa-d705-6269534c721a@gmail.com> Date: Mon, 12 Sep 2016 17:43:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------D08246A8F9374B463B7C9C8F" X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is a multi-part message in MIME format. --------------D08246A8F9374B463B7C9C8F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello, It seems, that the RLS description supposes that the users table contains the field "user", but it's a reserved keyword. Patch attached. (The replacement "user_name" selected as corresponding to the following examples). Best regards, Alexander --------------D08246A8F9374B463B7C9C8F Content-Type: text/x-patch; name="ddl-rowsecurity_user_column.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ddl-rowsecurity_user_column.patch" diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index a393813..c907081 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/ddl.sgml @@ -1629,7 +1629,7 @@ CREATE POLICY account_managers ON accounts TO managers CREATE POLICY user_policy ON users - USING (user = current_user); + USING (user_name = current_user); @@ -1642,7 +1642,7 @@ CREATE POLICY user_policy ON users CREATE POLICY user_policy ON users USING (true) - WITH CHECK (user = current_user); + WITH CHECK (user_name = current_user); --------------D08246A8F9374B463B7C9C8F Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --------------D08246A8F9374B463B7C9C8F--