A user can be given access to only some table columns.
We will continue the example in the previous recipe, so we assume that there is already a schema called someschema and a role called somerole with USAGE privileges on it. We create a new table on which we will grant column-level privileges:
CREATE TABLE someschema.sometable2(col1 int, col2 text);
We want to grant somerole the ability to view existing data and insert new data; we also want to give the ability to amend existing data, limited to column...