Re: Minimum bison and flex versions

From: Andres Freund <andres(at)anarazel(dot)de>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Minimum bison and flex versions
Date: 2022-09-08 17:07:40
Message-ID: 20220908170740.7pc46myxnkjohv7l@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-09-06 13:32:32 +0700, John Naylor wrote:
> Here are autoconf-only patches to that effect.

Looks like you did actually include src/tools/msvc as well :)

> Subject: [PATCH v2 2/2] Bump minimum version of Flex to 2.5.35

LGTM.

> From b7f35ae5e0fd55f8dceb2a4a546be3b50065a09c Mon Sep 17 00:00:00 2001
> From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
> Date: Tue, 6 Sep 2022 11:41:58 +0700
> Subject: [PATCH v2 1/2] Bump minimum version of Bison to 2.3
>
> Since the retirement of some older buildfarm members, the oldest Bison
> that gets regular testing is 2.3. MacOS ships that version, and will
> continue doing so for the forseeable future because of Apple's policy
> regarding GPLv3. While Mac users could use a package manager to install
> a newer version, there is no compelling reason to do so at this time.

s/to do so/to force them to do so/?

> --- a/src/pl/plpgsql/src/pl_gram.y
> +++ b/src/pl/plpgsql/src/pl_gram.y
> @@ -39,10 +39,7 @@
> /*
> * Bison doesn't allocate anything that needs to live across parser calls,
> * so we can easily have it use palloc instead of malloc. This prevents
> - * memory leaks if we error out during parsing. Note this only works with
> - * bison >= 2.0. However, in bison 1.875 the default is to use alloca()
> - * if possible, so there's not really much problem anyhow, at least if
> - * you're building with gcc.
> + * memory leaks if we error out during parsing.
> */
> #define YYMALLOC palloc
> #define YYFREE pfree

Getting rid of all that copy-pasted stuff alone seems worth doing this :)

LGTM.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-09-08 17:16:07 Add a missing comment for PGPROC.pgprocno
Previous Message walther 2022-09-08 17:06:24 Re: has_privs_of_role vs. is_member_of_role, redux