Re: BUG #18589: pg_get_viewdef returns wrong query

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: tlhquynh(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18589: pg_get_viewdef returns wrong query
Date: 2024-08-27 10:03:44
Message-ID: CAMbWs4_sT0Fd9f_BTarVxnDzsgywbM_MbbfMFLeBb==ZCb7d7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Aug 27, 2024 at 4:46 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> From my brief 2-minute look at how special_exprkind is used, it seems
> that special_exprkind is either EXPR_KIND_GROUP_BY or EXPR_KIND_NONE.
> Since it doesn't seem to be extensible as expected, I agree that maybe
> a bool field is more straightforward. Then we can have another bool
> field for ORDER BY, avoiding the need to override the in-group-by
> setting.

Alternatively, can we set special_exprkind = EXPR_KIND_ORDER_BY in
get_rule_orderby? I’m looking for a approach that is parallel to how
we set special_exprkind = EXPR_KIND_GROUP_BY in get_basic_select_query.

Thanks
Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-08-27 10:45:04 BUG #18592: rt_raster_to_gdal: Could not load the output GDAL driver after unsuccessful paralell operation
Previous Message Richard Guo 2024-08-27 08:46:17 Re: BUG #18589: pg_get_viewdef returns wrong query