Re: "hide" values in a column - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: "hide" values in a column
Date
Msg-id 3E6FAAB1.6070607@klaster.net
Whole thread Raw
In response to "hide" values in a column  ("Valerie Goodman" <val@webtribe.net>)
List pgsql-sql
Valerie Goodman wrote:
> Background:  The maniacs I work for want an e-suggestion box.  The identity
> of the suggestor must not be known, but the suggestion box administrator
> must be able to respond privately back to that person so I can't just
> completely leave out the identity of a suggestor against his/her suggestion.
> The suggestor is meant to be have complete anonymity.
> 
> The real question:  How do I completely "hide"/encrypt the values in the
> emp_id column even from me (who would be using psql) without the easy
> possibility of decoding it?
> 
> CREATE TABLE suggestions (
> emp_id INTEGER,
> dtm TIMESTAMP,
> comment TEXT,
> private_response BOOL,
> response TEXT,
> );

The easiest way to hide something is to create a view without some 
columns and revoke privileges from a table.

Another way to do this is to create a pl/pgsql function with creator 
access level. After this - revoke necessary privileges from all other users.

Anyway - I think you can't hide anything from table creator.

Maybe you need to answer not to suggestor, but to suggestion? You won't 
need identity of sugestor at all.

It sounds strange, that you want to answer privately to someone who 
should have anonymity...

Regards,
Tomasz Myrta



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: extending ORDER BY make query much slower
Next
From: Tom Lane
Date:
Subject: Re: extending ORDER BY make query much slower