Answer the question
In order to leave comments, you need to log in
How to configure row protection policy in PostgreSQL?
Hello. Tell me, is it possible to implement the protection of rows in tables in my case?
There is a productive server in which there is a table of settings, this table stores the settings of all additional servers, indicating the UUID of the server in the "Server" field.
There are also schema-servers for each of the servers, which have the same settings table, but it stores the settings of only a particular server.
User-mapping is set to one account for all servers.
I would like to somehow limit the change of rows from the database of servers in the productive database that are not related to a specific server.
Something like
CREATE POLICY security_ros ON settings_table
USING (server = (select server from settings_table group by server))
update settings_table set value = 1 where parameter = 'pararmeter'
update product_server.settings_table set value = 1 where parameter = 'parameter'
update product_server.settings_table set value = 1 where parameter = 'parameter' and server = 'uuid_server'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question