Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btyhK-00042R-SR for pgsql-admin@arkaria.postgresql.org; Tue, 11 Oct 2016 15:10:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1btyhK-000407-FI for pgsql-admin@arkaria.postgresql.org; Tue, 11 Oct 2016 15:10:30 +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 1btyfd-0001wk-4D for pgsql-admin@postgresql.org; Tue, 11 Oct 2016 15:08:45 +0000 Received: from imx6.etecsa.cu ([200.55.152.141]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btyfa-0001LZ-Le for pgsql-admin@postgresql.org; Tue, 11 Oct 2016 15:08:43 +0000 Received: from nodo1.etecsa.cu (unknown [192.168.91.200]) by imx6.etecsa.cu (Postfix) with ESMTP id 37B5EC0; Tue, 11 Oct 2016 11:08:37 -0400 (CDT) Received: from webmail.etecsa.cu (unknown [192.168.91.6]) by nodo1.etecsa.cu (Postfix) with ESMTP id 2C1173205D60; Tue, 11 Oct 2016 11:08:37 -0400 (CDT) Received: from 192.168.207.54 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Tue, 11 Oct 2016 11:08:15 -0500 (GMT+5) Message-ID: <46222.192.168.207.54.1476202095.squirrel@webmail.etecsa.cu> In-Reply-To: References: Date: Tue, 11 Oct 2016 11:08:15 -0500 (GMT+5) Subject: =?utf-8?B?UmU6IFtNQVNTTUFJTF0gW0FETUlOXSBBdHJpYnVpw6fDo28gZGUgcGVybWlz?= =?utf-8?B?c8OjbyBwYXJhIHRvZG9zIG9iamV0b3MgZG8gYmFuY28gZGUgZGFkb3MgZGUg?= =?utf-8?B?dW1hIMO6bmljYSB2ZXo=?= From: "Gilberto Castillo" To: "Diego Rivera Tavares de Araujo" Cc: pgsql-admin@postgresql.org Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 104168 [Oct 11 2016] X-KLMS-AntiSpam-Version: 5.6.0.28 X-KLMS-AntiSpam-Envelope-From: gilberto.castillo@etecsa.cu X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Info: LuaCore: 126 126 e1a2ef632325e7d14b9c14e65036ac8e4571b920, {msgid_created_by_recepient}, Auth:dkim=none X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, 2016/10/11 06:36:17 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, bases: 2016/10/11 07:53:00 #7977250 X-KLMS-AntiVirus-Status: Clean, skipped X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org > Bom dia, > > Estou com dificuldade para atribuir permissão para um usuario especifico > para todos os objetos do banco de dados. Alguém poderia ajudar? Usa este ejemplo mio: SELECT current_user; SET SESSION AUTHORIZATION postgres; CREATE TABLE mitabla (id int, nombre text); GRANT SELECT(nombre) ON mitabla TO usuario1; GRANT UPDATE(nombre) ON mitabla TO usuario1; REVOKE SELECT(nombre) ON mitabla FROM usuario1 restrict; SET SESSION AUTHORIZATION usuario1; SELECT * FROM mitabla; --ERROR: permission denied for relation mitabla SELECT nombre FROM mitabla; --ERROR: permission denied for relation mitabla INSERT INTO mitabla (id, nombre) VALUES (1,'Amaury'); --ERROR: permission denied for relation mitabla UPDATE mitabla SET id = 2; --ERROR: permission denied for relation mitabla UPDATE mitabla SET nombre = 'Felipe'; --Query returned successfully: 1 row affected, 21 ms execution time. Saludos, Gilberto Castillo ETECSA, La Habana, Cuba -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin