<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pg_default_acl on Postgres Scripts</title><link>https://www.postgresscripts.com/tags/pg_default_acl/</link><description>Recent content in Pg_default_acl on Postgres Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>PostgresScripts.com</copyright><lastBuildDate>Fri, 27 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.postgresscripts.com/tags/pg_default_acl/index.xml" rel="self" type="application/rss+xml"/><item><title>Grant SELECT on All Tables in PostgreSQL</title><link>https://www.postgresscripts.com/post/grant-select-on-all-tables-in-postgresql/</link><pubDate>Fri, 27 Mar 2026 00:00:00 +0000</pubDate><guid>https://www.postgresscripts.com/post/grant-select-on-all-tables-in-postgresql/</guid><description>
&lt;h2 id="grant-select-on-all-tables-in-postgresql"&gt;Grant SELECT on All Tables in PostgreSQL&lt;/h2&gt;
&lt;p&gt;This PostgreSQL script creates a read-only user and grants SELECT privileges on all existing tables in a schema, plus ensures the same access is automatically applied to any future tables created in that schema.&lt;/p&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;Third-party ETL tools, reporting tools, and analytics platforms often require a dedicated PostgreSQL user account with read-only access to all tables in a database. Granting SELECT on each table individually is tedious and error-prone. This script handles it in three statements and covers tables that do not exist yet.
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="7945792173"
data-ad-format="auto"
data-full-width-responsive="true"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;/p&gt;</description></item></channel></rss>