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 1maavx-00019s-7V for pgsql-general@arkaria.postgresql.org; Wed, 13 Oct 2021 09:52:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1maavw-0008Df-5o for pgsql-general@arkaria.postgresql.org; Wed, 13 Oct 2021 09:52:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maavv-0008DV-R6 for pgsql-general@lists.postgresql.org; Wed, 13 Oct 2021 09:52:23 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maavp-00077w-CP for pgsql-general@lists.postgresql.org; Wed, 13 Oct 2021 09:52:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XIIIWF0r0aDKp2ZoRq2DkoIOFF5hAgZ+FEIe9gDNDQE=; b=L8mbAf5Azi15mP1E9U24Ry+2x1 aqzlmUiECcHhIVe6NJ25H0Ij2oQlQhcXm0ZZSfCzhRW8Y12yAhkzOMemUPBpF1++5GKjVmPPrlLgt aLrC+NP52WU7M0MgT49+YzIxyYwNHnat9Z7vIcvIB6n3xT5NsS2Q9D6ARqXgba7ZEEMM=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1maavn-0006nJ-3O; Wed, 13 Oct 2021 11:52:15 +0200 Date: Wed, 13 Oct 2021 11:52:15 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: celati Laurent Cc: pgsql-general@lists.postgresql.org Subject: Re: Grant select for all tables of the 12 schemas of my one db ? Message-ID: <20211013095214.GA17654@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Oct 13, 2021 at 11:04:42AM +0200, celati Laurent wrote: > Good morning, > > I work on Postgresql 13 (windows) and Postgis. > For some "basic USERS", i have to grant select/read for all tables of the > 12 schemas of my db ? > > With Postgresql 13, i am obliged to write : > *GRANT SELECT ON ALL TABLES IN SCHEMA TO username ?* Yes. For each schema. You could write a DO query, or even get psql to run it automaticaly-ish for every schema, but it will still be separate query for each schema. depesz