Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 34316B5DBE4 for ; Tue, 19 Jul 2011 16:03:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 25919-06 for ; Tue, 19 Jul 2011 19:03:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out2.mail.amis.hr (out2.mail.amis.hr [188.129.0.5]) by mail.postgresql.org (Postfix) with ESMTP id 21F1CB5DBDC for ; Tue, 19 Jul 2011 16:03:03 -0300 (ADT) Received: from out.fsec.sm.srv.amis.hr (out.fsec.sm.srv.amis.hr [192.168.106.22]) by out2.mail.amis.hr (Postfix) with ESMTP id DD1E31FD83 for ; Tue, 19 Jul 2011 21:03:00 +0200 (CEST) Received: from pps.filterd (out [127.0.0.1]) by out.fsec.sm.srv.amis.hr (8.14.3/8.14.3) with SMTP id p6JIxMpk027015 for ; Tue, 19 Jul 2011 21:03:00 +0200 Received: from smtp.amis.hr (smtp.sm.srv.amis.hr [192.168.106.39]) by out.fsec.sm.srv.amis.hr with ESMTP id xn8s103y0-1 for ; Tue, 19 Jul 2011 21:03:00 +0200 A-Original-Client-UID: 188.129.66.135 splivalo Received: from [192.168.10.1] (cpe-188-129-66-135.dynamic.amis.hr [188.129.66.135]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: splivalo) by smtp.amis.hr (Postfix) with ESMTPSA id AF288265 for ; Tue, 19 Jul 2011 21:03:00 +0200 (CEST) Message-ID: <4E25D4CB.209@megafon.hr> Date: Tue, 19 Jul 2011 21:02:35 +0200 From: Mario Splivalo User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Replicating privileges from one user to another Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813, 1.0.211, 0.0.0000 definitions=2011-07-19_03:2011-07-19, 2011-07-19, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1107190149 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72 X-Spam-Level: ** X-Archive-Number: 201107/133 X-Sequence-Number: 37912 I have user foo that is owner of database dbfoo. Now I need to create user baz that will have the exact same privileges as user foo on database baz. I've tried this: GRANT ALL ON DATABASE dbfoo TO baz; but I still can't select form tables. Is there a easier way, or do I need to go trough all the tables/views/functions/schemas and issue GRANT ALL ON ... TO USER baz? Mario