On Thu, Feb 28, 2013 at 06:02:05PM +, Ben Morrow wrote:
Quoth m...@summersault.com (Mark Stosberg):
We are working on a project to start storing some data as soft deleted
(WHERE state = 'deleted') instead of hard-deleting it.
To make sure that we never accidentally expose the
Quoth lists-pg...@useunix.net (Wayne Cuddy):
On Thu, Feb 28, 2013 at 06:02:05PM +, Ben Morrow wrote:
(If you wanted to you could instead rename the table, and use rules on
the view to transform DELETE to UPDATE SET state = 'deleted' and copy
across INSERT and UPDATE...)
Sorry to
We are working on a project to start storing some data as soft deleted
(WHERE state = 'deleted') instead of hard-deleting it.
To make sure that we never accidentally expose the deleted rows through
the application, I had the idea to use a view and permissions for this
purpose.
I thought I could
Quoth m...@summersault.com (Mark Stosberg):
We are working on a project to start storing some data as soft deleted
(WHERE state = 'deleted') instead of hard-deleting it.
To make sure that we never accidentally expose the deleted rows through
the application, I had the idea to use a view
On 02/28/2013 01:02 PM, Ben Morrow wrote:
Quoth m...@summersault.com (Mark Stosberg):
We are working on a project to start storing some data as soft deleted
(WHERE state = 'deleted') instead of hard-deleting it.
To make sure that we never accidentally expose the deleted rows through
the
Mark Stosberg m...@summersault.com writes:
# Explicitly grant access to the view.
db= grant select on entities_not_deleted to myuser;
GRANT
# Try again to use the view. Still fails
db= SELECT 1 FROM entities_not_deleted WHERE some_col = 'y';
ERROR: permission denied for relation entities
On 02/28/2013 02:08 PM, Tom Lane wrote:
Mark Stosberg m...@summersault.com writes:
# Explicitly grant access to the view.
db= grant select on entities_not_deleted to myuser;
GRANT
# Try again to use the view. Still fails
db= SELECT 1 FROM entities_not_deleted WHERE some_col = 'y';
ERROR: