Re: Add more sanity checks around callers of changeDependencyFor()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add more sanity checks around callers of changeDependencyFor()
Date: 2023-07-07 23:47:21
Message-ID: ZKikCc68fWX+kQSX@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 06, 2023 at 06:41:49PM +0200, Peter Eisentraut wrote:
> On 29.06.23 01:36, Michael Paquier wrote:
>> While working on a different patch, I have noted three code paths that
>> call changeDependencyFor() but don't check that they do not return
>> errors. In all the three cases (support function, extension/schema
>> and object/schema), it seems to me that only one dependency update is
>> expected.
>
> Why can't changeDependencyFor() raise the error itself?

There is appeal in that, but I can't really get excited for any
out-of-core callers of this routine. Even if you would not lose much
error context, it would not be completely flexible if the number of
dependencies to switch is a variable number.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-07-08 00:17:21 Re: BUG #18016: REINDEX TABLE failure
Previous Message Tom Lane 2023-07-07 23:13:44 Re: DecodeInterval fixes