Re: Automatic deletion of orphaned rows

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Automatic deletion of orphaned rows
Дата
Msg-id CANzqJaBvJ=jXKuyahznN3_GrT0gAdw+r_+xSOd7P72EVufMvSw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Automatic deletion of orphaned rows  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
On Wed, Jan 22, 2025 at 9:37 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wednesday, January 22, 2025, Ron Johnson <ronljohnsonjr@gmail.com> wrote:

I therefore propose a feature, to be able to specify in a table schema
that a row should be deleted if orphaned.

For one thing, rows can't be orphaned if there's a foreign key reference. 

The description was correct even though using probably imprecise terminology.  The basic goal is to delete childless parents.

That's kinda what I thought he wrote, but it's so far beyond "normal" that I dismissed the possibility.  Parents are allowed to not have children, after all.

Is there ANY DBMS with a built-in reverse FK "parents must have children" feature?

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

В списке pgsql-general по дате отправления: