Re: BUG #18589: pg_get_viewdef returns wrong query - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18589: pg_get_viewdef returns wrong query
Date
Msg-id 3038762.1724764988@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18589: pg_get_viewdef returns wrong query  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes:
> 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.

I don't want to do that because it would result in prefixing Vars
within grouping/ordering expressions, which is unnecessary.  Only
a bare Var requires this treatment.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Bug in PostgreSQL 15 : Facing error in PG15
Next
From: Tom Lane
Date:
Subject: Re: BUG #18589: pg_get_viewdef returns wrong query