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

From: Henson Choi <assam258(at)gmail(dot)com>
To: Nitin Motiani <nitinmotiani(at)google(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-26 07:00:14
Message-ID: CAAAe_zDN40VgnmkVN20c_dgpVODjVDpREj7ZxvTC+5ay-F17xQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Nitin,

> Attaching the rebased patch.

Thanks. I checked v2: the code and the test are the same as in v1,
and only the context at the end of create_view.out has changed.
The whole test suite passes with it, and a pg_dump/restore of objects
using prefix operators on constants round-trips to the same
definitions.

I also tried it on the back branches again: the code applies
cleanly to REL_14 through REL_19, and the test applies as it is from
REL_16 on; on REL_14 and REL_15 only the expected output needs
regenerating.

I will mark it Ready for Committer.

Best regards,
Henson

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Richard Guo 2026-10-26 07:01:52 Re: BUG #19765: Wrong result from a chain of LEFT JOINs since v16
Previous Message shihao zhong 2026-10-26 04:01:34 Re: BUG #19784: "no relation entry for relid 1" when costing = ANY (<array expr over max(col)>) in a MinMaxAggPath