Re: View with duplicate GROUP BY entries - Mailing list pgsql-hackers

From Tom Lane
Subject Re: View with duplicate GROUP BY entries
Date
Msg-id 7598.1511283944@sss.pgh.pa.us
Whole thread Raw
In response to View with duplicate GROUP BY entries  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: View with duplicate GROUP BY entries  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> While reviewing patch for similar problem in postgres_fdw [1], I
> noticed that we don't use positional notation while creating the view.
> This might introduced anomalies when GROUP BY entries are
> non-immutable.

Yeah, we probably ought to make more of an effort to regenerate the
original query wording.  I do not think that forcing positional notation
is a suitable answer in this case, because it would result in converting
SQL-standard queries to nonstandard ones.  We might have to extend the
parsetree representation so that we can tell whether positional notation
was used to begin with.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Does XMLSERIALIZE output xmlattributes in a stable order?
Next
From: Sophie Herold
Date:
Subject: Re: to_typemod(type_name) information function