Re: updates for handling optional argument in system functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Tristan Partin <tristan(at)partin(dot)io>, Mark Wong <markwkm(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: updates for handling optional argument in system functions
Date: 2026-07-03 14:15:02
Message-ID: 3857325.1783088102@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> I have one question, though.

> Suppose a user executes GRANT or REVOKE on pg_get_ruledef(oid), then
> creates a dump with pg_dump. If that dump is restored into a newer
> server where these patches have been applied, the restore would fail
> because pg_get_ruledef(oid) no longer exists.

> Is that acceptable (this means that users need to handle the restore
> failure), or should pg_dump handle this case specially?

I wouldn't blink an eye at that. There's no obvious use-case for
someone to mess with the permissions on that function. Even
if there were, I don't think it'd be reasonable for pg_dump to
try to patch it up. (I'm not sure that pg_dump would dump such
grants in the first place.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ewan Young 2026-07-03 14:20:42 Re: REPACK CONCURRENTLY fails on tables with generated columns
Previous Message Tom Lane 2026-07-03 14:11:26 Re: Schema-qualify the equality operator when deparsing NULLIF/IS DISTINCT FROM