On 2013-04-16, Mark Stosberg <m...@summersault.com> wrote: > My challenge is that I want to make very hard or impossible to access > the soft-deleted rows through SELECT statements. There are lots of > selects statements in the system. > > My current idea is to rename the "foo" table to something that would > stand-out like "foo_with_deleted_rows". Then we would create a view > named "foo" that would select all the rows except the soft-deleted views.
[...] > Is this sensible? Is there another approach to soft-deletes I should be > considering? yes, rename the table and replace it with a view that excludes the soft deleted records. Make "do instead" rules to handle inserts, updates and deletes on the view by rediecting them to the base table. -- ⚂⚃ 100% natural -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql