# Soft deletes with Ecto and PostgreSQL

DevFeed: [Soft deletes with Ecto and PostgreSQL](<https://devfeed.tech/articles/soft-deletes-with-ecto-and-postgresql-44020.md>)

Original publisher: [Read original article](<https://dashbit.co/blog/soft-deletes-with-ecto>)

Author: José Valim

Published: 2024-08-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dashbit Blog](<https://devfeed.tech/sources/dashbit-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [phoenix](<https://devfeed.tech/topics/phoenix.md>), [Database](<https://devfeed.tech/topics/database.md>), [migration](<https://devfeed.tech/topics/migration.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [delete](<https://devfeed.tech/tags/delete.md>), [ecto](<https://devfeed.tech/tags/ecto.md>), [implement](<https://devfeed.tech/tags/implement.md>), [migration](<https://devfeed.tech/tags/migration.md>), [phoenix](<https://devfeed.tech/tags/phoenix.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [rules](<https://devfeed.tech/tags/rules.md>), [soft-deletes](<https://devfeed.tech/tags/soft-deletes.md>)

## AI overview

This tutorial explains how to implement soft deletes in an Ecto application backed by PostgreSQL. It compares application-level handling with database-level enforcement using PostgreSQL rules and views.

## Source excerpt

This article details how to implement soft-delete in Ecto using PostgreSQL rules and views