Re: Peer-review requested of soft-delete scheme
| От | Jasen Betts |
|---|---|
| Тема | Re: Peer-review requested of soft-delete scheme |
| Дата | |
| Msg-id | kkomb9$skn$2@gonzo.reversiblemaps.ath.cx обсуждение исходный текст |
| Ответ на | Peer-review requested of soft-delete scheme (Mark Stosberg <mark@summersault.com>) |
| Список | pgsql-sql |
On 2013-04-16, Mark Stosberg <mark@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
В списке pgsql-sql по дате отправления: