Permission to change only one table column in PostgreSQL

0

Good evening!

I'm using PostgreSQL and it has a table called Products. When the user visits a product through the site I give an UPDATE on that table to increment the visits column.

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 Visits column of the product table. If not, is there an alternative?

Thank you!

    
asked by anonymous 27.10.2017 / 04:57

1 answer

0

I got some people here!

The syntax looks like this

GRANT UPDATE(visitas) on produtos to user_website;

That is

GRANT UPDATE(coluna) on tabela to nome_usuario;
    
27.10.2017 / 05:03