question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PostgreSQL Row Security Policies (RLS)

See original GitHub issue

Hello, first, thanks for this awesome software, you guys are doing a great work making something really usable to manage databases!

There is a feature that allow to manage rules in postgres ( https://github.com/dbeaver/dbeaver/issues/2284 ).

I think it could be good to know something similar for Policies: https://www.postgresql.org/docs/current/ddl-rowsecurity.html

Steps to reproduce, if exist:

CREATE TABLE public."user" (
	id serial NOT NULL,
	"name" text NULL
);

CREATE POLICY user_read_all_policy ON public.user
  FOR SELECT
  USING (true);

CREATE POLICY user_insert_any_policy ON public.user
  FOR INSERT
  WITH CHECK(true);

ALTER TABLE public.user ENABLE ROW LEVEL SECURITY;

Actually, the way to see what policies have a table, we can use:

select * from pg_policies;

imagen


I hope you can consider this for future releases.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:40
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
pyrockscommented, Jan 12, 2020

Would be nice to have a Policies tab on the list under a Table’s Properties tab, similar to Indexes, Triggers, Constraints, Partitions, Rules etc. I use policies on almost all tables.

6reactions
ShadelessFoxcommented, Jul 14, 2022

Implemented and will be available in DBeaver 22.1.3:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 5.8. Row Security Policies - PostgreSQL
Row security policies can be specific to commands, or to roles, or to both. A policy can be specified to apply to ALL...
Read more >
PostgreSQL Row Level Security (RLS): Basics and Examples
Row level security (RLS for short) is a PostgreSQL security feature provided by the open source PostgreSQL database.
Read more >
Hands-on with PostgreSQL Authorization - Row-Level Security
What is Row-Level Security (RLS)? It's a way for PostgreSQL to limit what rows of a table are visible to a query. Typically,...
Read more >
How to implement Column and Row level security in ...
Row -level security (RLS for short) is an important feature in the PostgreSQL security context. This feature enables database administrators ...
Read more >
Using PostgreSQL Row-Level Security in a high-growth ...
At Dovetail, we leverage Row-Level Security (RLS) features built into PostgreSQL. By composing together GRANTS and POLICIES (that depend on transaction ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found