pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: tlhquynh@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18589: pg_get_viewdef returns wrong query
Date: Tue, 27 Aug 2024 09:23:08 -0400
Message-ID: <3038762.1724764988@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs4_sT0Fd9f_BTarVxnDzsgywbM_MbbfMFLeBb==ZCb7d7A@mail.gmail.com>
References: <18589-70091cb81db1a3f1@postgresql.org>
	<CAMbWs4_nMJ8uXMxd8T7eUh3DbNa9DbNM9_CpuQN5Yk74SUaEEg@mail.gmail.com>
	<2906775.1724692311@sss.pgh.pa.us>
	<CAMbWs4_D7CVSxJVmQQA+5KWz9XxqOpEKgQvE9Pfoc8pXPwJNTw@mail.gmail.com>
	<CAMbWs4_sT0Fd9f_BTarVxnDzsgywbM_MbbfMFLeBb==ZCb7d7A@mail.gmail.com>

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





view thread (10+ messages)  latest in thread

Message-ID: <3038762.1724764988@sss.pgh.pa.us>
Permalink:  ../3038762.1724764988@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3038762.1724764988@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, tlhquynh@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18589: pg_get_viewdef returns wrong query
  In-Reply-To: <3038762.1724764988@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox