Permission to change only one table column in Postgresql

Asked

Viewed 630 times

0

good night!

I’m using Postgresql and in it I have a table called Products. When the user visits a product through the site I give an UPDATE in this table to increase the column visits.

The problem is that the database user can only have read permission. So I would like to know how do I give UPDATE permission only in the product table visits column. If it is not possible there is some alternative?

Thank you!

1 answer

0


I got it here, guys!

The syntax was like this

GRANT UPDATE(visitas) on produtos to user_website;

That is to say

GRANT UPDATE(coluna) on tabela to nome_usuario;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.