Re: BUG #19767: pg_get_viewdef prints ORDER BY (- '3'::int4) as (- 3), which reparses as column position -3

From: Nitin Motiani <nitinmotiani(at)google(dot)com>
To: assam258(at)gmail(dot)com
Cc: alpkeles99(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19767: pg_get_viewdef prints ORDER BY (- '3'::int4) as (- 3), which reparses as column position -3
Date: 2026-10-22 13:00:04
Message-ID: CAH5HC95pOg=PMZGLsepmJQeR5im-FzR7q=7HnoPw_C1ofB=kXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 19, 2026 at 8:05 PM Henson Choi <assam258(at)gmail(dot)com> wrote:
>
> On master, the code change alone leaves all existing regression
> output unchanged, so the extra '::type' you mention does not show up
> there; it only affects prefix operators applied to int4 and numeric
> constants, the only ones printed without a label. I also built REL_15
> through REL_19 with the patch and ran the regression tests: the code
> applies cleanly to all of them, and the patch applies as it is from
> REL_16 on; on REL_15 only the expected output needs regenerating, for
> the column qualification pretty mode still prints there.
>

Thanks for the feedback and the analysis, Henson. I've created a
commitfest entry for this at
https://commitfest.postgresql.org/patch/7500/.

Regards,
Nitin Motiani
Google

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Staroverov Ilja 2026-10-22 10:52:28 Re: pg_stat_statements replaces SQL/JSON ON EMPTY / ON ERROR keywords with parameters