Re: "hide" values in a column

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Valerie Goodman <val(at)webtribe(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: "hide" values in a column
Date: 2003-03-12 21:46:25
Message-ID: 3E6FAAB1.6070607@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-03-12 22:00:58 Re: extending ORDER BY make query much slower
Previous Message Stephan Szabo 2003-03-12 21:44:43 Re: extending ORDER BY make query much slower