Re: BUG #17439: DROP FUNCTION functionName(); drops associated generated column without using CASCADE - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #17439: DROP FUNCTION functionName(); drops associated generated column without using CASCADE
Date
Msg-id CAKFQuwa10Z27W8dm=-DPokw1_gq9TRqMbggg=_ZwdvNG=CYSRg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17439: DROP FUNCTION functionName(); drops associated generated column without using CASCADE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tuesday, March 15, 2022, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Is there any recommendation you would have for mitigation besides not
> dropping functions that may be used by generated columns?

I don't see any good user-level workaround :-(.


Create a dummy view that simply calls the function with null inputs.  That view then will at least enforce the dependency.

David J.
 

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17439: DROP FUNCTION functionName(); drops associated generated column without using CASCADE
Next
From: Peter Geoghegan
Date:
Subject: VACUUM can set pages all-frozen without also setting them all-visible