Re: updates for handling optional argument in system functions

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Mark Wong <markwkm(at)gmail(dot)com>, Andreas Karlsson <andreas(at)proxel(dot)se>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: updates for handling optional argument in system functions
Date: 2026-04-08 02:09:51
Message-ID: 990C3A75-D4CE-49E1-AC30-E746EF39DBB8@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Apr 8, 2026, at 09:46, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>
> On Tuesday, April 7, 2026, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>
> We can clearly see ":expr {FUNCEXPR :funcid 1573 “.
>
> With this patch, will that view break? How would users find all such broken views? Maybe PostgreSQL already has some recommended way to handle this kind of situation that I am not aware of?
>
> pg_dump resolves oid=1573 and produces a textual SQL representation, which is then executed during pg_restore. This happens manually, and also automatically by pg_upgrade. Since the text form hasn’t changed the view is still valid in v19. You would see the new oid if inspecting the rule after the upgrade.
>
> So yes, the public serialization format being SQL and thus mandatory new object creation during upgrade is the way PostgreSQL handles implementation detail isolation.
>
> David J.
>

Hi David, thanks for the explanation, I really didn’t know that.

Then, the patch looks good to me. GET_PRETTY_FLAGS(false) returns PRETTYFLAG_INDENT, so no behavior change either.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-04-08 02:15:38 Re: Reduce build times of pg_trgm GIN indexes
Previous Message Zhijie Hou (Fujitsu) 2026-04-08 02:09:18 RE: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication