Re: Delete a table automatic?

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: 黄宁 <huangning0722(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Delete a table automatic?
Date: 2022-11-01 09:31:52
Message-ID: CACJufxEbBvqxx_=a4_z2k2_UQiOxN6YnWC8cMGurYWR0wJKd7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 1, 2022 at 2:33 PM 黄宁 <huangning0722(at)gmail(dot)com> wrote:

> I now have two tables named A and B. Table B is calculated based on the
> data of table A. I wonder if table B can be automatically deleted when
> table A is deleted?
>

Your question seems not that specific.
You can use https://dbfiddle.uk/btGcOH30 to showcase your specific
problem/question.

you can use DROP TABLE CASCADE.
DROP TABLE manual:
https://www.postgresql.org/docs/current/sql-droptable.html

--
I recommend David Deutsch's <<The Beginning of Infinity>>

Jian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2022-11-01 13:41:14 Re: Delete a table automatic?
Previous Message Vasily Kulikov 2022-11-01 08:09:44 Re: PQconsumeinput() may close the fd