From: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> |
---|---|
To: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Michael Paquier <michael(at)paquier(dot)xyz>, Colin Watson <cjwatson(at)canonical(dot)com> |
Subject: | Re: Backport "WITH ... AS MATERIALIZED" syntax to <12? |
Date: | 2019-10-19 14:52:49 |
Message-ID: | e6e51f23-9e4a-12db-1771-45aa9e61fbbf@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/19/19 6:48 AM, Tomas Vondra wrote:
> On Sat, Oct 19, 2019 at 11:56:56AM +0200, Andres Freund wrote:
>> Hi,
>>
>> On October 19, 2019 6:01:04 AM GMT+02:00, Andrew Gierth
>> <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
>>>>>>>> "Michael" == Michael Paquier <michael(at)paquier(dot)xyz> writes:
>>>
>>> > On Fri, Oct 18, 2019 at 02:21:30PM +0100, Colin Watson wrote:
>>> >> However, an alternative would be to backport the new syntax to some
>>> >> earlier versions. "WITH ... AS MATERIALIZED" can easily just be
>>> >> synonymous with "WITH ... AS" in versions prior to 12; there's no
>>> >> need to support "NOT MATERIALIZED" since that's explicitly
>>> >> requesting the new query-folding feature that only exists in 12.
>>> >> Would something like the attached patch against REL_11_STABLE be
>>> >> acceptable? I'd like to backpatch it at least as far as PostgreSQL
>>> >> 10.
>>>
>>> Michael> I am afraid that new features don't gain a backpatch. This is
>>> Michael> a project policy. Back-branches should just include bug fixes.
>>>
>>> I do think an argument can be made for making an exception in this
>>> particular case. This wouldn't be backpatching a feature, just
>>> accepting
>>> and ignoring some of the new syntax to make upgrading easier.
>>
>> +1
>>
>
> +0.5
>
> In general, I'm not opposed to accepting and ignoring the MATERIALIZED
> syntax (assuming we'd only accept AS MATERIALIZED, but not the negative
> variant).
>
> FWIW I'm not sure the "we don't want to upgrade application code at the
> same time as the database" is really tenable.
I'm -1 for exactly this reason.
In any case, if you insist on using the same code with pre-12 and
post-12 releases, this should be achievable (at least in most cases) by
using the "offset 0" trick, shouldn't it?
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Adrien Nayrat | 2019-10-19 15:02:01 | Log statement sample - take two |
Previous Message | Christoph Moench-Tegeder | 2019-10-19 13:59:00 | Re: jsonb_set() strictness considered harmful to data |